We only support wrapping the first element around an element (all others are ignored). Fixes ticket #4903.

This commit is contained in:
John Resig 2009-07-14 23:43:58 +00:00
parent 991dafae16
commit 7a04d1da54
2 changed files with 8 additions and 2 deletions

View file

@ -24,7 +24,7 @@ jQuery.fn.extend({
if ( this[0] ) {
// The elements to wrap the target around
var wrap = jQuery( html, this[0].ownerDocument ).clone();
var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone();
if ( this[0].parentNode )
wrap.insertBefore( this[0] );