title: Materialize CSS sideNav closeOnClick not working
body: <p>I am using Materialize css on a one page site.</p>
  
  <p>I can not get the sideNav to close when the links in the sideNav are clicked.  I am fairly new to jquery so I must be missing something</p>
  
  <p>I am initialising the sidenav with this</p>
  
  <pre><code>$(document).ready(function(){
      $('.button-collapse').sideNav({
            menuWidth: 300, // Default is 300
            edge: 'right', // Choose the horizontal origin
            closeOnClick: true, // Closes side-nav on &lt;a&gt; clicks, useful for Angular/Meteor
            draggable: true // Choose whether you can drag to open on touch screens
          }
        );
  
  });
  </code></pre>
  
  <p>this is my html</p>
  
  <pre><code>            &lt;ul class="side-nav" id="slide-out"&gt;
              &lt;li&gt;&lt;a class="welcome waves-effect waves-am-red" href="#welcome"&gt;Welcome&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a class="about waves-effect waves-am-red" href="#about"&gt;About &lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a class="where waves-effect waves-am-red" href="#where"&gt;Where we work&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a class="acheivements waves-effect waves-am-red" href="#acheivements"&gt;2016 Acheivements&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a class="fundraising waves-effect waves-am-red" href="#fundraising"&gt;2016 fundraising&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a class="potential waves-effect waves-am-red" href="#case-studies"&gt;Case studies&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a class="financial waves-effect waves-am-red" href="#financial-highlights"&gt;highlights&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a class="outlook waves-effect waves-am-red" href="#outlook"&gt;Outlook &lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
          &lt;a href="#" data-activates="slide-out" class="button-collapse"&gt;
              &lt;i class="material-icons"&gt;menu&lt;/i&gt;
          &lt;/a&gt;
  </code></pre>
  
  <p>I am referencing the init.js file in my index.html
  All the other materialize things are working
  I have even gone into the main file and changed the default to closeOnClick: true  but it still won't close on click.</p>
  
  <p>Any help would be greatly appreciated I have spent days on this now.....</p>