Foundation 5 - Joyride not working

I'm struggling to get Joydry to work. I entered the code as described in the Zurb documentation, but it just won't work. I need advice on what I can do wrong.

<div class="row">
  <div class="large-12 columns">
    <ul>
      <li><h2 id="firstStop" class="panel">First</h2></li>
      <li><h2 id="secondStop" class="panel">Second</h2></li   

    </ul>
  </div>
</div>

At the foot of the page I have

<!-- At the bottom of your page but inside of the body tag --> 
    <ol class="joyride-list" data-joyride>
      <li data-id="firstStop" data-text="Next">
        <p>Test</p>
      </li>
      <li data-id="secondStop" data-text="Next">
        <p>Test</p>
      </li>
      <li data-button="End">
        <p>Test</p>
      </li>  
    </ol>

And the foundation, initialized as

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

However, nothing happens when the page loads. I'm embarrassed right now. Can someone hel?

+4
source share
1 answer

I found the answer to my question, but I had to sneak into the Foundation 5 demo code to find it. The initialization of joyride, which is not really a document, should be as follows:

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

Why Zurb does not mention that it is a complete secret.

+5
source

Source: https://habr.com/ru/post/1539555/


All Articles