开发者

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");
    });
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜