title: pass "this" reference to function inside on()
body: <p>I have following piece of code. What is does is when use hover's over a link then it consoles <code>this</code>.</p>
  
  <pre><code>var Mod = function () {
      $('.link').hover(this.hover, this.out);
  };
  
  Mod.prototype = function () {
      var hover = function () {
          console.log(this);
      },
  
      out = function () {
          console.log(this);
      };
  
      return {
          hover: hover,
          out: out
      }
  }();
  </code></pre>
  
  <p>In my above code <code>this</code> references to <code>$('.link')</code> element but I want to use this for current object. So to achieve this, I can modify constructor to following.</p>
  
  <pre><code>var Mod = function () {
      var self = this;
      $('.link').hover(function () {
          self.hover();
      }, function () {
          self.out();
      });
  };
  </code></pre>
  
  <p>This works fine but the constructor looks messy now. Second way is to use jquery <code>$.proxy()</code> again this will make my constructor look messy.</p>
  
  <p>My question is that <strong>how can I pass <code>this</code> which references to current object to rest of the functions inside object while using the <code>jquery's hover function</code> as i am using it now in first example above?</strong></p>