github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

jquery / jquery-ui

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 877
    • 200
  • Source
  • Commits
  • Network (200)
  • Graphs
  • Tree: f775b00

click here to add a description

click here to add a homepage

  • Switch Branches (8)
    • bind
    • devpreview
    • formcontrols
    • master
    • menu
    • panel
    • tooltip
    • widget-super
  • Switch Tags (21)
    • 1.9m2
    • 1.9m1
    • 1.8rc3
    • 1.8rc2
    • 1.8rc1
    • 1.8b1
    • 1.8a2
    • 1.8a1
    • 1.8.4
    • 1.8.3
    • 1.8.2
    • 1.8.1
    • 1.8
    • 1.7
    • 1.6rc6
    • 1.6rc5
    • 1.6rc3
    • 1.6rc2
    • 1.6
    • 1.5.2
    • 1.5.1
  • Comments
  • Contributors
Sending Request…

The official jQuery user interface library. — Read more

  Cancel

http://jqueryui.com/

  Cancel
  • HTTP
  • Git Read-Only

This URL has Read+Write access

Widget: Fixed a problem with the .remove() proxy.

Fixes #5143 - .remove() proxy doesn't work properly.
scottgonzalez (author)
Fri Feb 05 18:12:41 -0800 2010
commit  f775b00cfa0ad662dd0e
tree    981a2ba7ae3a2295f1c6
parent  f2a9deb611332776e126
M ui/jquery.ui.widget.js 16 ••••
Txt ui/jquery.ui.widget.js
  • View file @ f775b00
... ...
@@ -12,12 +12,16 @@
12 12
 var _remove = $.fn.remove;
13 13
 
14 14
 $.fn.remove = function( selector, keepData ) {
15  
-  if ( !keepData ) {
16  
-    $( "*", this ).add( this ).each(function() {
17  
-      $( this ).triggerHandler( "remove" );
18  
-    });
19  
-  }
20  
-  return _remove.apply( this, arguments );
  15
+  return this.each(function() {
  16
+    if ( !keepData ) {
  17
+      if ( !selector || $.filter( selector, [ this ] ).length ) {
  18
+        $( "*", this ).add( this ).each(function() {
  19
+          $( this ).triggerHandler( "remove" );
  20
+        });
  21
+      }
  22
+    }
  23
+    return _remove.call( $(this), selector, keepData );
  24
+  });
21 25
 };
22 26
 
23 27
 $.widget = function( name, base, prototype ) {

0 notes on commit f775b00

Please log in to comment.
Blog | Support | Training | Job Board | Contact | API | Status | Twitter | Help
© 2010 GitHub Inc. All rights reserved. | Terms | Privacy | Security
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server
  • English
  • Català
  • Čeština
  • Deutsch
  • Español
  • Français
  • Hrvatski
  • Indonesia
  • Italiano
  • 日本語
  • Nederlands
  • Norsk
  • Polski
  • Português (BR)
  • Српски
  • Svenska
  • 中文