aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.widget.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-06-14 12:33:16 -0400
committerScott González <scott.gonzalez@gmail.com>2012-06-14 12:33:16 -0400
commitff39bed57a05ca060033187b8aecebafab357f78 (patch)
treee82f4c3faa3b5269f0f86e3f186a6f3024ad7466 /ui/jquery.ui.widget.js
parent00d4beb0ca4a99933bb7e786a1dd50618c180a0b (diff)
downloadjquery-ui-ff39bed57a05ca060033187b8aecebafab357f78.tar.gz
jquery-ui-ff39bed57a05ca060033187b8aecebafab357f78.zip
Widget: Added _off() for removing event handlers. Fixes #7795 - Widget: _on and _off.
Diffstat (limited to 'ui/jquery.ui.widget.js')
-rw-r--r--ui/jquery.ui.widget.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js
index 22049cbb8..5366beefe 100644
--- a/ui/jquery.ui.widget.js
+++ b/ui/jquery.ui.widget.js
@@ -387,6 +387,11 @@ $.Widget.prototype = {
});
},
+ _off: function( element, eventName ) {
+ eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace;
+ element.unbind( eventName ).undelegate( eventName );
+ },
+
_delay: function( handler, delay ) {
function handlerProxy() {
return ( typeof handler === "string" ? instance[ handler ] : handler )