FAQs

1. It's not working locally:

If your're using it locally, make sure to use a local server. The frontend(s) will not be displayed, when you just open a .html page in a browser. If you see ...

file://...

... in the browsers address bar, it won't work. Use a local server like XAMPP or start a local server in your working directory on a Mac with ...

> python -m SimpleHTTPServer 8000

Then open your .html like this:

http://localhost:8000/<yourPage>.html

2. Should I use "onload" or "" events (wait till everything is loaded)?

Yes! Do it like this:

var myYumpu; // make a global variable
document.addEventListener("DOMContentLoaded", function(){
   ...
   myYumpu = new Yumpu();
   myYumpu.create_...( ... );
   ...
});

3. Do I have to create multiple Yumpu objects when creating multiple magazines or bookshelfs on my page?

No! You can create multiple magazines and/or bookshelfs with one Yumpu object.

Correct:

   myYumpu = new Yumpu();
   myYumpu.create_player( ... );
   myYumpu.create_bookshelf( ... );
   myYumpu.create_player( ... );
   myYumpu.create_bookshelf( ... );
   ...

Wrong:

   myYumpu = new Yumpu();
   myYumpu.create_player( ... );

   myYumpu2 = new Yumpu();
   myYumpu2.create_bookshelf( ... );

   myYumpu3 = new Yumpu();
   myYumpu3.create_player( ... );

   myYumpu4 = new Yumpu();
   myYumpu4.create_bookshelf( ... );
   ...

4. Why should I use the Yumpu Javascript API to create bookshelfs and magazines, rather than embedding on my page?

Performance, speed, loading duration, and handling! If using more than one on your page, you can watch the performance of your page going down. It's getting slow, laggy - just no fun to use, as all the resources get loaded over and over again. With our Javascript API these problems will be avoided. Also, the needed resources only get loaded once - no mather how many bookshelfs or magazines you create. Another thing is, that the bookshelfs and magazines resize themselves automatically within the HTML elements you place them in, which, on the other hand, will be resized by your CMS (or whatever you are using).

results matching ""

    No results matching ""