javascript - Turn.js (flipbook effect) is not working -
sorry, not getting did mistake (as newbie javascript). wrote code flipbook effect using turn.js of tutorial. output in browser showing blank screen. guess, there must awkward mistake m still not getting . plz help.
<html> <head> <script type="text/javascript" src="jquery-1.5.1.min.js"></script> <script type="text/javascript" src="turn.js"></script> <style type="text/css"> body{ background: #9988aa; } #book{ width: 1152px; height: 400px; } #book .turn-page{ background-color: #ddd; background-size: 100% 100%; } </style> </head> <body> <div id="book"> <div style="background-image:url('images/1.jpg');"></div> <div style="background-image:url('images/2.jpg');"></div> <div style="background-image:url('images/3.jpg');"></div> <div style="background-image:url('images/4.jpg');"></div> <div style="background-image:url('images/5.jpg');"></div> <div style="background-image:url('images/6.jpg');"></div> <div style="background-image:url('images/7.jpg');"></div> <div style="background-image:url('images/8.jpg');"></div> </div> <script type="text/javascript"> $(window).ready(function(){ $('#book').turn({ display:'double', acceleration: true, elevation:50; }); }); $(window).bind('keydown',function(e){ if (e.keycode==37) $('#book').turn('previous'); else if (e.keycode==39) $('#book').turn('next'); }); </script> </body> </html>
hi there small error in code, kindly remove semi colon following line.
elevation:50;
it should following, remove semi colon. hope resolve issue.
$(window).ready(function(){ $('#book').turn({ display:'double', acceleration: true, elevation:50 }); }); $(window).bind('keydown',function(e){ if (e.keycode==37) $('#book').turn('previous'); else if (e.keycode==39) $('#book').turn('next'); });
Comments
Post a Comment