title: rails jQuery Accordion
body: <p>How do you set up jQuery to work with rails. I specifically want to use the accordion feature. I have used this before with PHP but i cannot work out where everything needs to go in a rails application.   I have imported jQuery into the javascript folder and included it in the application. My HTML is laid out correctly, but i don't understand where the following should go:</p>
  
  <pre><code>&lt;script&gt;
    $(document).ready(function() {
      $("#accordion").accordion();
    });
  &lt;/script&gt;
  </code></pre>
  
  <p>I have also tried installing jRails and using the scriptaculous Accordion, but neither of them worked either, so I think I am missing some vital link between javascript and rails.</p>
  
  <p>I have looked all over for some explicit instructions on how to set it up, if anyone has a link or can walk me through it it would be appreciated.</p>
  
  <p>After checking firebug I can see I am getting the following error:</p>
  
  <pre><code>$("#accordion").accordion is not a function
  </code></pre>
  
  <p>I call jQuery before I call application.js </p>