title: jquery plugin cannot access object referenced in plugin definition
body: <p>I am trying to write a plugin that would react to any changes on some input fields within a dom element that i choose.</p>
  
  <p>my plugin definition is as follows:</p>
  
  <pre><code>(function($){
  
      var methods = {
          init : function( options ) { 
              console.log(this.obj);
              var inputs = $('input', this.obj);
              $.each(inputs, function(i, domElement){
                  $(this.obj).premiumUpdatable('addEvent', $(domElement));
              })
  
          },
          addEvent: function(element){
              $(element).bind('change',function(){
                  console.log($(element).val());
              })
          }
      };
  
      $.fn.premiumUpdatable = function( method ) {
  
          return this.each(function(){
              var obj = $(this);
              if ( methods[method] ) {
                  return methods[ method ].apply( this, Array.prototype.slice.call( arguments, 1 ));
              } else if ( typeof method === 'object' || ! method ) {
                  return methods.init.apply( this, arguments );
              } else {
                  $.error( 'Method ' +  method + ' does not exist on jQuery.premiumUpdatable' );
              }    
          });
      };
  })(jQuery);
  </code></pre>
  
  <p>Then I call my plugin like:</p>
  
  <pre><code>$('div.updatable').premiumUpdatable();
  </code></pre>
  
  <p>Problem is that when i try console.log(this.obj) in one of the methods defined i always get undefined. I wish to get the reference that i made in the definition of the plugin, obj = $(this); ...i wish to get the $(this) element. </p>
  
  <p>I need this plugin applied to a number of dom elements on the page but if i can't get the reference to the dom element ...i can't really tell which is which....</p>
  
  <p>Any help would be greatly appreciated...</p>
  
  <p>PS: I may not be asking the right questions as I am still new to developing plugins in jquery but this problem seems to really bug me and I can't overcome it.</p>