, I 이벤트에 기능을 결합하고자하지만 함수가jQuery를 바인딩이
function Foo(){
t : "123",
bar: function(){
// I am here
$('#selector').bind('click' this.foo);
}
,
foo: function(){
//I want when to be able to use the current object here by this
//this.t should be 123 and this.bar should call the above function
}
}
아하 !!! 나는 그런 존재를 결코 알지 못했다 :) – Abid
@Joy는 여기에서 잘 작동한다. http://jsfiddle.net/m84wh/ – charlietfl
@charlietfl, 해명 해줘서 고마워. +1, jQuery 함수를 호출 할 때 컨텍스트를 덮어 쓸 줄 알았는데. 좋은 것을 배웠습니다. –