Sorry I’m beginner, can somebody help me out?
<script>
var iW = $(document).width();
$(function() {
//single book
$('#mybook').booklet({
next: '#custom-next',
prev: '#custom-prev',
keyboard: true,
width: return iW, // here is the problem! It doesn't work.
height: 200
});
//multiple books with ID's
$('#mybook1, #mybook2').booklet();
//multiple books with a class
$('.mycustombooks').booklet();
});
</script>
returnthere is unnecessary. You just needwidth: iW.That said, you should also bring the call to
$(document).width()within thereadyblock.