Side navigation
#3344 closed bug (duplicate)
Opened September 09, 2008 02:55PM UTC
Closed December 10, 2009 03:19AM UTC
wrapAll should probably call clone(true)
Reported by: | waterson | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.3 |
Component: | core | Version: | 1.2.6 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Right now, wrap calls "clone()" instead of "clone(true)". This has the effect of causing any event handlers on the wrapping node to be lost; for example,
$("#someElement").wrap($("<div>").click(function() { alert("hi"); }));
ends up being equivalent to:
$("#someElement").wrap($("<div>"));
This is not hard to work around, but it would be nice to fix!
Probably a duplicate of ticket #2977.