Good catch. Filed and fixed. http://dev.jquery.com/ticket/5785
Also, in the future, you may want to use the new .unwrap() method which is designed for this exact purpose: c.children.unwrap(); (Although unwrap uses replaceWith so you would've hit the same bug, it seems. Glad it's fixed!) --John On Mon, Jan 11, 2010 at 3:44 PM, Janis <janis.skarne...@gmail.com> wrote: > Hi, > I would like to know if I have found a bug or the new version of > jQuery works different. The problem is with this code: > > var c = inner.wrapInner("<div style='overflow:auto'></div>").children > (); > //some stuff > c.replaceWith(c.children()); > > When using jQuery 1.3.2 then everything works fine but when I use > 1.4a2 then children of "inner" div are losing events that are binded > to them. > > Actually, I looked at source code 1.3.2 for replaceWith and changed > c.replaceWith(c.children()); > to > c.after( c.children() ).remove(); > and now it works. Maybe this helps for someone. > > Janis > > -- > You received this message because you are subscribed to the Google Groups > "jQuery Development" group. > To post to this group, send email to jquery-...@googlegroups.com. > To unsubscribe from this group, send email to > jquery-dev+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/jquery-dev?hl=en. > > > >
-- You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-...@googlegroups.com. To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en.