title: Importing jQuery function to Ember error "i is not defined"
body: <p>I'm trying to implement the below jQuery calls to be used in my Ember Controller as actions.</p>
  
  <p>jQuery (taken from <a href="http://jsfiddle.net/simo/57SR9/94/" rel="nofollow noreferrer">http://jsfiddle.net/simo/57SR9/94/</a>):</p>
  
  <pre><code>$('#checkAll').click(function(){
      for(i=0; i &lt; chart.series.length; i++) {
          if(chart.series[i].selected == false){
              chart.series[i].select();
              showSeries.call(chart.series[i], {checked: true});
          }
      }
  });
  $('#uncheckAll').click(function(){
      for(i=0; i &lt; chart.series.length; i++) {
          if(chart.series[i].selected == true){
              chart.series[i].select();
              showSeries.call(chart.series[i], {checked: false});
          }
      }
  });
  </code></pre>
  
  <p>Implementation in Ember:</p>
  
  <pre><code>checkAll() {
    Ember.$('#checkAll').click(function(){
        for(i=0; i &lt; chart.series.length; i++) {
            if(chart.series[i].selected == false){
                chart.series[i].select();
                showSeries.call(chart.series[i], {checked: true});
            }
        }
    });
  },
  
  uncheckAll() {
    Ember.$('#uncheckAll').click(function(){
        for(i=0; i &lt; chart.series.length; i++) {
            if(chart.series[i].selected == true){
                chart.series[i].select();
                showSeries.call(chart.series[i], {checked: false});
            }
        }
    });
  },
  </code></pre>
  
  <p>But I'm getting the error: <code>"i is not defined"</code> when I click the buttons:</p>
  
  <pre><code>  checkAll: function checkAll() {
      _ember['default'].$('#checkAll').click(function () {
        for (i = 0; i &lt; chart.series.length; i++) { &lt;== error here
          if (chart.series[i].selected == false) {
            chart.series[i].select();
            showSeries.call(chart.series[i], { checked: true });
          }
        }
      });
    },
  </code></pre>
  
  <p>What is wrong here?</p>