title: Uncaught TypeError: Object #<Object> has no method 'apply'
body: <p>jQuery is throwing the following error:</p>
  <blockquote>
  <p>Uncaught TypeError: Object # has no method 'apply'</p>
  <p>f.event.dispatch</p>
  <p>h.handle.i</p>
  </blockquote>
  <p>I've found these related posts, but couldn't solve the problem using them:
  <a href="https://stackoverflow.com/questions/11032659/uncaught-typeerror-object-object-object-has-no-method-apply">This</a>, <a href="https://stackoverflow.com/questions/11032659/uncaught-typeerror-object-object-object-has-no-method-apply">this</a> and <a href="https://stackoverflow.com/questions/10741588/uncaught-typeerror-object-functionarg1-arg2-has-no-method-apply">this</a>.</p>
  <p>Here's the troublesome code:</p>
  <pre><code>$(document).ready(function(){
  $('form.rating').click({
      cancelShow:true,
      callback: function(ui, type, new_value) {
          var values = ui.$form.serializeArray();
          values.push({
              'name': 'rating',
              'value': new_value
          });
          values = jQuery.param(values);
          var msg = ui.$form.attr('update-msg');
          $(msg).removeClass('hidden');
          $(msg).show();
          $(msg).find('div.msg-default').show();
          $(msg).find('div.msg-result').hide();
          $.ajax({
              'type': 'POST',
              'dataType': 'json',
              'url': ui.$form.attr('action'),
              'data': values
          }).done(function(data) { 
              var overall_rating = ui.$form.attr('update-overall');
              if(overall_rating &amp;&amp; data['overall_rating']){
                  $(overall_rating).html(data['overall_rating']);
              }
              if(msg){
                  $(msg).find('div.msg-default').hide();
                  if(data['msg']) {
                      $(msg).find('div.msg-result').show();
                      $(msg).find('div.msg-result').html(data['msg']);
                      window.setTimeout(function() {
                          $(msg).addClass('hidden');
                      }, 2000);
                  } else {
                      $(msg).addClass('hidden');
                  }
              }
              if(data['user_rating'] &amp;&amp; data['user_rating']&gt;0) {
                  ui.select(parseInt(data['user_rating']));
              }
          });
      }
  });
  });
  </code></pre>
  <p>Any ideas?</p>
  <p><strong>Edit:</strong> Okay, so I stripped it down to:</p>
  <pre><code>$(document).ready(function(){
      $('form.rating').click({
      });
  });
  </code></pre>
  <p>And it is still showing the same error. Could this have something to do with my jQuery script? The only other info it shows is this line, but I don't think it helps much, since the file has 3 lines in total: jquery-1.7.2.min.js:3</p>