aboutsummaryrefslogtreecommitdiffstats
path: root/src/manipulation.js
diff options
context:
space:
mode:
authorjeresig <jeresig@gmail.com>2010-01-25 19:16:23 -0500
committerjeresig <jeresig@gmail.com>2010-01-25 19:16:23 -0500
commit9f17e70ae95cc2d4b945bc94283b87cc5b8b23db (patch)
tree322953877a76dc4b307c01b0c324d5355d2ddb96 /src/manipulation.js
parent55a64cf095b295d334010c6e0a00863f307caffa (diff)
downloadjquery-9f17e70ae95cc2d4b945bc94283b87cc5b8b23db.tar.gz
jquery-9f17e70ae95cc2d4b945bc94283b87cc5b8b23db.zip
Make work wrapInner(fn) work consistently. Fixes #5799.
Diffstat (limited to 'src/manipulation.js')
-rw-r--r--src/manipulation.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/manipulation.js b/src/manipulation.js
index 4d0ffd057..37a8cfdfe 100644
--- a/src/manipulation.js
+++ b/src/manipulation.js
@@ -77,6 +77,12 @@ jQuery.fn.extend({
},
wrapInner: function( html ) {
+ if ( jQuery.isFunction( html ) ) {
+ return this.each(function(i) {
+ jQuery(this).wrapInner( html.call(this, i) );
+ });
+ }
+
return this.each(function() {
var self = jQuery( this ), contents = self.contents();