javascript - How can i activate a second joyride tour -



javascript - How can i activate a second joyride tour -

i have problem joyride tour ,when finsish 1 tour want start sec 1 .what seek execute seconde tour in postridecallback ,but end looping first tour .does knows how prepare this?

function preview(){ $('#joyridetipcontent').joyride({ autostart : true, prestepcallback : function(index, tip) { console.log(index); }, poststepcallback : function(index, tip) { }, postridecallback : function(index, tip) { console.log("stop1"); preview2(); console.log("stop1.1"); }, tiplocation:"left", modal : true, expose : true }); } function preview2(){ console.log("stop2.0"); $('#joyridetipcontent2').joyride({ prestepcallback : function(index, tip) { console.log("stop21.0"); }, poststepcallback : function(index, tip) { console.log("stop22.0"); }, postridecallback : function(index, tip) { console.log("stop23"); alert("tada") }, tiplocation:"left", modal : true, expose : true }); console.log("stop2.1"); }

in code (see above) preview function utilize start joyride tour , console.log's testing , not hava specific meaning

i know old question, added check calls joyride's destroy method remove previous tutorial contents before starting one.

function tutorial1(){ if($('.joyride-tip-content')) { $.fn.joyride('destroy') } $('#joyridetutorial1').joyride({ modal:true, autostart : true, expose: true }); } function tutorial2(){ if($('.joyride-tip-content')) { $.fn.joyride('destroy') } $('#joyridetutorial2').joyride({ modal:true, autostart : true, expose: true }); }

seems working far.

javascript jquery zurb-joyride

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

c# - Create a Notification Object (Email or Page) At Run Time -- Dependency Injection or Factory -

Set Up Of Common Name Of SSL Certificate To Protect Plesk Panel -