objects using $.proxy()

by nickadeemus2002

HTML

<div style="height:100px; background:#CCC"></div>

JavaScript

var Foo={

  t : "123",
  bar: function(){
    // I am here
    $('div').bind('click', $.proxy( this.foo, this));
  }
  ,
  foo: function(){
    alert( this.t)
  }
}
      
Foo.bar();