]> source.dussan.org Git - jquery.git/commitdiff
Cleanup bubbling focus and blur events
authorlrbabe <lrbabe@lrbabe-laptop>
Fri, 6 Nov 2009 11:59:45 +0000 (19:59 +0800)
committerJohn Resig <jeresig@gmail.com>
Mon, 9 Nov 2009 11:41:43 +0000 (19:41 +0800)
- Use cached event instead of jQuery.event
- Do not cache event.special if you use it only once

src/event.js

index fde5767304e56c63ae69eb7567c5a743e4c9ddab..2f5b1490232a09f9722eb5234f130d7db3b57cd5 100644 (file)
@@ -575,7 +575,6 @@ jQuery.each({
        blur: "focusout"
 }, function( orig, fix ){
        var event = jQuery.event,
-               special = event.special,
                handle = event.handle;
        
        function ieHandler() { 
@@ -583,18 +582,18 @@ jQuery.each({
                return handle.apply(this, arguments);
        }
 
-       special[orig] = {
+       event.special[orig] = {
                setup:function() {
                        if ( this.addEventListener )
                                this.addEventListener( orig, handle, true );
                        else
-                               jQuery.event.add( this, fix, ieHandler );
+                               event.add( this, fix, ieHandler );
                }, 
                teardown:function() { 
                        if ( this.removeEventListener )
                                this.removeEventListener( orig, handle, true );
                        else
-                               jQuery.event.remove( this, fix, ieHandler );
+                               event.remove( this, fix, ieHandler );
                }
        };
 });