zurb / joyride

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

Destroy then Offset bug? #57

Open superphonic opened 11 years ago

superphonic commented 11 years ago

Hi,

Not sure if this is expected behaviour or not, but I will outline steps to reproduce my issue.

There are 10 steps in my tour: 1) Initialise joyride on clicking a button called "Start" 2) Index 0 shows - click next 3) Index 1 shows - click next 4) Index 2 shows - click next 5) Index 3 shows - click next 6) Click button called "Destroy" which calls the joyride ('destroy') function 7) Click button called "Middle" which initialises joyride with the option of 'startOffset': 2 8) Index 2 shows - click next 9) Index 4 shows - click next 10) Index 5 shows - click next

Now my problem is with step 9, joyride has obviously carried on from index it was at before I destroyed it. When it should (as in what I would expect) carry on from from offset 2 as that is where I started it from.

Is this expected behaviour or is something wrong somewhere? either way, how do I fix it?

Thanks

superphonic commented 11 years ago

Managed to fix this issue by replacing .off in the destroy function with .unbind.

I am using jquery1.4.4, which is supported by Joyride, however the jquery documentation says that .off was introduced in 1.7..

Anyhoo.. problem fixed for me.

blanchardjeremy commented 11 years ago

This issue looks ready to be closed. :)