Reputation: 437
I'm using the TurnJS library to make a flip book and I also using a tooltip library.
The book and the tooltips work for few pages but sometimes it not works. It seems that the tooltip function cannot be loaded. I don't know why. Do I have to use a specific event to solve this problem ? Here is my tooltip function :
$(document).ready(function($) {
$('.source').each(function() {
var selector = '#' + $(this).data('source-id');
Tipped.create(this, $(selector)[0], {
skin: 'white',
hook: 'topleft',
hideOn: 'click',
showOn: 'click',
maxWidth: 250,
closeButton: true
});
});
});
I load my flipbook like that:
function loadApp() {
// Create the flipbook
$('.flipbook').turn({
// Width
width: 900,
// Height
height: 620,
// Elevation
elevation: 50,
// Enable gradients
gradients: true,
duration: 1000,
pages: 16,
// Auto center this flipbook
autoCenter: true,
});
}
// Load the HTML4 version if there's not CSS transform
yepnope({
test: Modernizr.csstransforms,
yep: ['lib/turn.js'],
nope: ['lib/turn.html4.min.js'],
both: ['css/basic.css'],
complete: loadApp
});
thanks for your help
Upvotes: 1
Views: 1364