Can only refer to $(this) in jQuery delegate() callback -
normally when use .delegate() refer $(this) in callback function. if want affect other element on page? doesn't work:
$("form#my-form").delegate("input#my-textbox", "change", function(){ $("#some-other-div").toggleclass("toggled"); });
Comments
Post a Comment