toomuchdesign/offside

Confusing docs

jenstornell opened this issue · 1 comments

Many might not try this because the docs are confusing. In the HTML the menu id is "my-offside" and in the JS it is "my-menu". It can seem like a detail but when copy paste from the docs we expect it to work right away without changing anything. Then we modify it to our needs, when we see that it works.

 <!-- Off-canvas element  -->
  <nav id="my-offside">
    <ul>
      <li><a href="#">Home</a></li>
      <li><a href="#">About</a></li>
      <li><a href="#">Projects</a></li>
      <li><a href="#">Contact</a></li>
    </ul>
  </nav>
<!-- Put this right before the </body> closing tag -->
  <script>

    //Offside minimal setup
    var myOffside = offside( '#my-menu', {

        slidingElementsSelector:'#my-content-container',
        buttonsSelector: '#my-button, .another-button',
    });
  </script>

Just fixed it. Thank you so much for your support!