Possible bug with undelegate & clone
- var newNode = node.clone(true);
- newNode
- .children(".sibling").undelegate().end()
- .children(".wrap,.group").css("display","block");
- inlay.append(newNode);
I've tried this in a dozen ways now, both with append, appendTo and in different orders, but the outcome is the same: undelegate never removes the click function.
Any idea why this code would not work or is this really a bug?
Further testing with the exaples on http://api.jquery.com/undelegate/ reveals:
$("body").undelegate();
works just fine, while
$("button").undelegate();
$("#theone").undelegate();
just don't do anything. Too bad I can't use the body selector in my nested, recursive application.