git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Make work wrapInner(fn) work consistently. Fixes #5799.
[jquery.git]
/
src
/
manipulation.js
diff --git
a/src/manipulation.js
b/src/manipulation.js
index
4d0ffd0
..
37a8cfd
100644
(file)
--- 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();