zurb / joyride

jQuery feature tour plugin.
http://www.zurb.com/playground/jquery-joyride-feature-tour-plugin
1.42k stars 238 forks source link

Uncaught TypeError: Cannot call method 'next' of undefined #153

Closed fulanodigital closed 11 years ago

fulanodigital commented 11 years ago

Whein debugging either with IE10 or Chrome, I get this alert: "Uncaught TypeError: Cannot call method 'next' of undefined" right after starting joyride. In IE10, the debugger stops at this point. After I click the first "Next" button, The code runs, aparently with no issues. I'm using jquery 1.8.3 and tryied with jquery 1.7.2 and both has the same alert. My program runs in C# with Visual Studio 10 and I'm loading Modernizr that I downloaded earlyer: modernizr-2.6.2-respond-1.1.0.min.js

The line code of jquery.joyride-2.0.3.js with the error is:

settings.$li = settings.$li.next();

I tryied to run without "modernizr" and still got the error.

I'm not a back end developer. I'm a Webdesigner with a bit of front end knoledge

alisonjo315 commented 10 years ago

@fulanodigital did you work it out? We're getting this error when the Joyride is set to only run once and the cookie is "ridden."

Melonbwead commented 10 years ago

Ran into same problem today, solution is to have foundation initialise first, then call the joyride start after

$(document).foundation(); $(document).foundation('joyride', 'start');

Find the documentation a bit miss leading if this was the intended use case on how to start the joyride plug in.

Originally i doing just $(document).foundation('joyride', 'start'); thinking that was enough.