我正在使用Foundation Joyride,每次我加载网页时都会开始游览,但是我如何才能首次加载网页时启动游览?
我的设置是……
$(window).load(function() { //Foundation Joyride (Tour) $("#tour").joyride({ 'cookieMonster': true,'cookieName': 'JoyRide','cookieDomain': 'mydomain.co.uk/','postRideCallback' : function () { $(this).joyride('destroy'); },cookieMonster: false }); });
解决方法
最后工作,结果是头文件的声明顺序.
<html> <head> <script type="text/javascript" src="jquery.js"></script> <link rel="stylesheet" type="text/css" href="foundation.css"> <script type="text/javascript" src="foundation.min.js"></script> <script type="text/javascript" src="jquery.cookie.js"></script> <script type="text/javascript" src="jquery.foundation.joyride.js"></script> <script> $(window).load(function() { $("#tour").joyride({ cookieMonster: true,cookieName: 'JoyRide' }); }); </script> </head> <body> <ol id="tour"> <li><p>This is the tour.</p></li> </ol> </body> </html>