aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2011-04-12 14:58:55 -0400
committerJohn Resig <jeresig@gmail.com>2011-04-12 14:58:55 -0400
commit34adda3c8805557028adf137d73cc13316c28cc8 (patch)
tree94187d82c624117758d398f7d5066a6873d56e03 /src
parentb05d631b302160d9483cbb595be5eae68c992dd3 (diff)
downloadjquery-34adda3c8805557028adf137d73cc13316c28cc8.tar.gz
jquery-34adda3c8805557028adf137d73cc13316c28cc8.zip
Fixing some minor formatting problems.
Diffstat (limited to 'src')
-rw-r--r--src/event.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/event.js b/src/event.js
index c22fa4689..d05c37040 100644
--- a/src/event.js
+++ b/src/event.js
@@ -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,