f775b00
click here to add a description
click here to add a homepage
The official jQuery user interface library. — Read more
http://jqueryui.com/
This URL has Read+Write access
Widget: Fixed a problem with the .remove() proxy. Fixes #5143 - .remove() proxy doesn't work properly.
@@ -12,12 +12,16 @@
var _remove = $.fn.remove;
$.fn.remove = function( selector, keepData ) {
- if ( !keepData ) {
- $( "*", this ).add( this ).each(function() {
- $( this ).triggerHandler( "remove" );
- });
- }
- return _remove.apply( this, arguments );
+ return this.each(function() {
+ if ( !keepData ) {
+ if ( !selector || $.filter( selector, [ this ] ).length ) {
+ $( "*", this ).add( this ).each(function() {
+ $( this ).triggerHandler( "remove" );
+ });
+ }
+ return _remove.call( $(this), selector, keepData );
};
$.widget = function( name, base, prototype ) {
f775b00