Can only refer to $(this) in jQuery delegate() callback
Normally when I use .delegate() I refer to $(this) in the callback function. But what if I want to affect some other element on the page? Doesn't work:
$("fo开发者_JS百科rm#my-form").delegate("input#my-textbox", "change", function(){
$("#some-other-div").toggleClass("toggled");
});
精彩评论