Make work wrapInner(fn) work consistently. Fixes #5799.
This commit is contained in:
parent
55a64cf095
commit
9f17e70ae9
2 changed files with 20 additions and 8 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue