title: How do you add $(document).ready(function() to joomla
body: <p>I need to add this to joomla I've tried adding it to the template index.php file but it doesn't work any ideas?</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
   $(document).ready(function() {
     $("nav#menu").mmenu(
      {
        classes: "mm-light"
     });
  });
  &lt;/script&gt;
  </code></pre>