title: Getting Uncaught TypeError with Jquery rateIt plugin
body: <p>I am using Jquery rateIt plugin in my backbone project.</p>
  
  <p>I am using its AJAX example part .</p>
  
  <p>I could see images are loading no call going through and no response and some time get error like </p>
  
  <p><strong>"Uncaught TypeError: Object rateAnswer has no method 'apply' "</strong></p>
  
  <p>here is my JS</p>
  
  <pre><code>define(['jquery', 'underscore', 'backbone', 'text!tpl/questionnaire.html', 'Collection/cAppCollection', 'Models/mAppModel', 'jqueryRateIt'], 
  function($, _, Backbone, questionnaireTpl, appCollection, appModel, jqRateIt) {
  
  var questionnaire = Backbone.View.extend({
  
      el : '.row',
      template : _.template(questionnaireTpl),
  
      initialize : function(e) {
  
          $('.hero-unit').css('display','none');
          this.render(e);
      },
      //this renders my template 
      //on success of response , loads response than call rateit() function than bind rated and reset to function rateAnswer
      //but here no call fo rateAnswer
      render : function(e) {
  
              var elem = this.$el,
                  temp = this.template,
                  appCollectObj = new appCollection();
  
                  appCollectObj.fetch({
                      data: $.param({subject: e.id}),
                      success: function(model, response) {
                              $(elem).html(temp({model:response}));
                               $('div.rateit').rateit();
                               $('#products .rateit').bind('rated reset', 'rateAnswer');
                              },
                      error: function() {
                              console.log('Failed to fetch!');
                              }
                  });
  
      },
  
      rateAnswer : function(){
  
                  var ri = $(this),
                  appCollectObj = new appCollection();
  
  
                  var value = ri.rateit('value');
                  var questionId = ri.data('productid'); 
  
                  appCollectObj.fetch({
                      data: $.param({questionId : questionId, value : value}),
                      success: function(model, response) {
                              $('#response').append('&lt;li&gt;' + data + '&lt;/li&gt;');
                              },
                      error: function() {
                              $('#response').append('&lt;li style="color:red"&gt;' + msg + '&lt;/li&gt;');
                              }
                  });
      }
    });
  
    return questionnaire;
  });
  </code></pre>
  
  <p>and HTML part is </p>
  
  <pre><code>&lt;div id="products"&gt;
          &lt;ul&gt;
            &lt;li&gt;
             RateIt: &lt;div data-productid="&lt;%= elem.id %&gt;" class="rateit"&gt;&lt;/div&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
          &lt;ul id="response"&gt;&lt;/ul&gt;
        &lt;/div&gt;
  </code></pre>
  
  <p><a href="http://www.radioactivethinking.com/rateit/example/example.htm#ex_11" rel="nofollow">here the link to RateIt plugin example</a></p>