title: Call is undefined
body: <p>I'm trying to set up my plugin to accept a callback function inside as a option argument:</p>
  
  <pre><code>(function($) {
  
      $.fn.MyjQueryPlugin = function(options) {
          var defaults = {
              onEnd: function(e) {}
          };
  
          var settings = $.extend({}, defaults, options);
  
          return this.each(function() {
              // do stuff (complete() gets called here)
  
          });
      };
  
      function complete(e){
          settings.onEnd.call(this); // &lt;- the error?
      }
  
  })(jQuery);
  </code></pre>
  
  <p>But I get a error that call() is undefined. What's wrong with my code?</p>
  
  <p>ok, I changed this with:</p>
  
  <pre><code>(function($) {
  
      $.fn.MyjQueryPlugin = function(options) {
          var defaults = {
              onEnd: function(e) {}
          };
  
          var settings = $.extend({}, defaults, options);
  
          var complete = function(e){
            settings.onEnd.call(this); // &lt;- the error?
          }
  
  
          return this.each(function() {
              // do stuff (complete() gets called here)
  
          });
      };   
  
  })(jQuery);
  </code></pre>
  
  <p>and the error is still there...</p>