X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fmanipulation.js;h=57b607a9b865d9a5d78bb7251cee37fc4244668d;hb=35951021545a3ae88018fc5ea3bebd1bc7d09c6a;hp=59973deee8ba546bd1612eab9a471f38b61da690;hpb=7d7a960035b7431887581c9cef09eaaef28e3d27;p=jquery.git diff --git a/src/manipulation.js b/src/manipulation.js index 59973de..57b607a 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -18,6 +18,10 @@ jQuery.fn.extend({ }, wrapAll: function( html ) { + if(jQuery.isFunction(html)) { + return this.each(function() { jQuery(this).wrapAll(html.call(this)); }); + } + if ( this[0] ) { // The elements to wrap the target around var wrap = jQuery( html, this[0].ownerDocument ).clone();