I've been stuck in the code for quite some time now and decided to try and get some help. The code will generate a book by using the Turn.js plugin. This plugin worked with no problems until I got the error Object [object Object] has no method 'turn'
one time. Then started to test it more and seen this error pop-up more and more after a page refresh/visit. It's something that occurs once in a while when loading the page (lets say you open the page 50 times 1-5% of the time it generates the error). The error start on the 3th line of the following code:
if (flipbook != "none") // Create book
{
flipbook.turn({.....}); //error here
}
I've checked the flipbook if the content in it is any different with or without the error, which seems not to be the case. It contains all the pages (HTML page content) it needs to create the book using Turn.js. Hope it's enough information to help me out.
Remember to refresh a few times since the error does not occur all the time.
Edit:
It does show on multiple systems not only mine. It feels as if turn.js loads around the same time and once in w while its to slow to catch up give error and then show flipbook with turn but says its not there.
Edit2:
Found an easy way to generate the error. First open the link and then open the console, then minimize the browser or select a different tab and then refresh the page in console you opened before (just regular f5 in console). In 2 or 3 times you'll see the error. This made me think about the error and made me question the viewport sizing I use to make it responsive(yes its responsive but no not in the page you currently see it. This will be used in the future website and embedded share code with iframe). But after setting it to a hardcode sizing it still pops-up.