title: Using jQuery with Ember action handler
body: <p>I am trying to access jquery object ($) from inside a action handler in ember controller. But it says <code>$</code> is undefined.</p>
  
  <p><strong>How do you get access to jQuery object from an action handler?</strong></p>
  
  <p>Take this app for example:</p>
  
  <pre><code>&lt;div id="main"&gt;&lt;/div&gt;
  
  &lt;script type="text/x-handlebars" data-template-name="index"&gt;
      &lt;div id="scroll-div"&gt;
          &lt;h1&gt;Test Div&lt;/h1&gt;
  
      &lt;/div&gt;
      &lt;a href="" {{action "findHeight"}}&gt;Find height&lt;/a&gt;
  &lt;/script&gt;
  </code></pre>
  
  <h2>JS</h2>
  
  <pre><code>App = Ember.Application.create({
      rootElement: '#main'
  });
  
  App.IndexController = Ember.ArrayController.extend({
      actions: {
          findHeight: function(){
              console.log(this.$('#scroll-div').height);
          }
      }
  });
  </code></pre>
  
  <p>JS fiddle: <a href="http://jsfiddle.net/sisir/5ammt2fv/" rel="nofollow">http://jsfiddle.net/sisir/5ammt2fv/</a></p>