Make sure that events are cloned for wrap, fixes #2977.

This commit is contained in:
John Resig 2009-12-08 11:21:24 -08:00
parent 77510fec02
commit f5b649fafb
2 changed files with 16 additions and 2 deletions

View 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] );