Make sure that events are cloned for wrap, fixes #2977.
[jquery.git] / src / manipulation.js
index 1fe82fa..0c2753e 100644 (file)
@@ -48,7 +48,7 @@ jQuery.fn.extend({
 
                if ( this[0] ) {
                        // The elements to wrap the target around
-                       var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone();
+                       var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
 
                        if ( this[0].parentNode ) {
                                wrap.insertBefore( this[0] );