mirror of
https://github.com/jquery/jquery.git
synced 2026-02-05 22:45:03 -05:00
Make sure that the contents of the element is still in place when html(Function) is called. Fixes #6733.
This commit is contained in:
@@ -248,10 +248,8 @@ jQuery.fn.extend({
|
||||
|
||||
} else if ( jQuery.isFunction( value ) ) {
|
||||
this.each(function(i){
|
||||
var self = jQuery(this), old = self.html();
|
||||
self.empty().append(function(){
|
||||
return value.call( this, i, old );
|
||||
});
|
||||
var self = jQuery(this);
|
||||
self.html( value.call(this, i, self.html()) );
|
||||
});
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user