]> source.dussan.org Git - jquery.git/commitdiff
Fixing some minor formatting problems.
authorJohn Resig <jeresig@gmail.com>
Tue, 12 Apr 2011 18:58:55 +0000 (14:58 -0400)
committerJohn Resig <jeresig@gmail.com>
Tue, 12 Apr 2011 18:58:55 +0000 (14:58 -0400)
src/event.js

index c22fa46893f74d952b00cb5b4c44fe1032766774..d05c370406fd0712a5d39deab6e9de870b158ab5 100644 (file)
@@ -286,6 +286,7 @@ jQuery.event = {
                        type = type.slice(0, -1);
                        exclusive = true;
                }
+
                if ( type.indexOf(".") >= 0 ) {
                        // Namespaced trigger; create a regexp to match event type in handle()
                        namespaces = type.split(".");
@@ -306,6 +307,7 @@ jQuery.event = {
                        jQuery.extend( jQuery.Event(type), event ) :
                        // Just the event type (string)
                        jQuery.Event(type);
+
                event.namespace = namespaces.join(".");
                event.namespace_re = new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)");
                event.exclusive = exclusive;
@@ -343,7 +345,7 @@ jQuery.event = {
                event.target = elem;
 
                // Clone any incoming data and prepend the event, creating the handler arg list
-               data = data? jQuery.makeArray( data ) : [];
+               data = data ? jQuery.makeArray( data ) : [];
                data.unshift( event );
 
                var cur = elem,