zurb / joyride

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

Joyride works only after called twice #200

Open lightmar opened 9 years ago

lightmar commented 9 years ago

Hi,

Thank you for this plugin. When I call Joyride to start it, it doesn't show. Only after I call it again it shows. On button click I call:

$("#editor-tour").joyride({ /* Options will go here */ });

What is the problem?

Thanks

JoeWoodward commented 9 years ago

+1

EdoardoTona commented 9 years ago

+1

ziobudda commented 9 years ago

+1

sturdynut commented 9 years ago

+1

@mrsweaters - This is definitely either an issue or misunderstanding in how to use this plugin. Can you please have a look? The library is definitely great, it would be awesome if I didn't have to call $(...).joyride() twice. Just is icky.

TehShrike commented 9 years ago

If you want the tour to start right away when you initialize joyride, you need to pass in the option autoStart: true.

If you call joyride after you've already passed in options, it is ignoring the options and just calling joyride('restart').

gdejong commented 8 years ago

I had the same issue. Like @TehShrike said, adding:

      $("#joyride").joyride({
        autoStart: true
      });

does the trick!

zolem commented 7 years ago

This works great. Might be wise to add this to the options list on the web page. I was really confused.