title: Calling a method in a jQuery extension
body: <p>I'm creating a jQuery plugin and wish to offer several extensions to make by solution more modular. I think I've got the correct syntax to perform the extend, but I can't seems to call any of the methods in my extension. I've only included sections of the code to try and be brief but I can provide more if needed. Any help is much appreciated!</p>
  
  <p>I'm using <a href="http://jqueryboilerplate.com/" rel="nofollow noreferrer">http://jqueryboilerplate.com/</a> for my main plugin and this stackoverflow answer for adding my extension methods: <a href="https://stackoverflow.com/questions/2050985/best-way-to-extend-a-jquery-plugin#answer-4414356">Best Way to Extend a jQuery Plugin</a> </p>
  
  <p>Main jQuery plugin</p>
  
  <pre><code>function Plugin( element, options ) {
      this.element = element;
  
      // jQuery has an extend method which merges the contents of two or
      // more objects, storing the result in the first object. The first object
      // is generally empty as we don't want to alter the default options for
      // future instances of the plugin
      this.options = $.extend( {}, defaults, options );
  
      this._defaults = defaults;
      this._name = pluginName;
  
      this.init();
  }
  
  Plugin.prototype = {
  
      init: function() {
  
          //This line does NOT work
          var id = this.showId();
          console.log(id);
  
          var toolbar = this.createToolbar(this.options);
          $(this.element).append(toolbar);
  
          if(this.options.showPalette)
          {
              var palette = this.createPalette(this.options);
              $(this.element).append(palette);
              this.fetchPalette();
          }
  
          var canvas = this.createCanvas(this.options);
          $(this.element).append(canvas);
  
      }, .... 
  </code></pre>
  
  <p>Plugin constructor</p>
  
  <pre><code>$.fn[pluginName] = function ( options ) {
      return this.each(function () {
          if (!$.data(this, "plugin_" + pluginName)) {
              $.data(this, "plugin_" + pluginName, new Plugin( this, options ));
          }
      });
  };
  </code></pre>
  
  <p>Extension method</p>
  
  <pre><code>var extensionMethods = {
      /*
       * retrieve the id of the element
       * this is some context within the existing plugin
       */
      showId: function(){
          return this.element[0].id;
      }, ....
  </code></pre>
  
  <p>jQuery extend</p>
  
  <pre><code>$.extend(true, $['fn']['workflowEditor'].prototype, extensionMethods);
  </code></pre>