title: Jquery not working on external JS file
body: <p>I have a custom dropdown menu that works perfectly fine when I add the script on the main html file but when i link it from an external JS file, the function seems to act faulty. It is not showing output.</p>
  
  <p>This is the Script</p>
  
  <pre class="lang-js prettyprint-override"><code>$('.tc-navigation &gt; a').click(function() {   
      var element = $(this).parent('li');
      element.children('ul').toggleClass('toto');
      return false;
  });
  $(document).click(function() {
      $('.tc-navigation &gt; li &gt; ul').removeClass('toto');
  }); 
  </code></pre>
  
  <p>Do Jquery functions like <code>parent()</code>, <code>children()</code>, <code>siblings()</code> stuff like that work on an external JS file? If not, is there a way to make them work?</p>