aboutsummaryrefslogtreecommitdiffstats
path: root/src/event.js
diff options
context:
space:
mode:
authorJordan Boesch <jboesch26@gmail.com>2011-04-23 17:58:56 -0400
committerJohn Resig <jeresig@gmail.com>2011-04-23 17:58:56 -0400
commit02ad0aa3b6d3c28494465539976211b6a89cb1e0 (patch)
tree0ebc0a8dd4542a13856f96e7c8343f6f40f694b0 /src/event.js
parent15ccae91db70ab5591de66001ee2f46d540e4e19 (diff)
downloadjquery-02ad0aa3b6d3c28494465539976211b6a89cb1e0.tar.gz
jquery-02ad0aa3b6d3c28494465539976211b6a89cb1e0.zip
Landing pull request 344. using jQuery.nodeName where applicable.
More Details: - https://github.com/jquery/jquery/pull/344
Diffstat (limited to 'src/event.js')
-rw-r--r--src/event.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/event.js b/src/event.js
index d20c6f2d0..0f09241c9 100644
--- a/src/event.js
+++ b/src/event.js
@@ -707,7 +707,7 @@ if ( !jQuery.support.submitBubbles ) {
jQuery.event.special.submit = {
setup: function( data, namespaces ) {
- if ( this.nodeName && this.nodeName.toLowerCase() !== "form" ) {
+ if ( !jQuery.nodeName( this, "form" ) ) {
jQuery.event.add(this, "click.specialSubmit", function( e ) {
var elem = e.target,
type = elem.type;
@@ -756,7 +756,7 @@ if ( !jQuery.support.changeBubbles ) {
}).join("-") :
"";
- } else if ( elem.nodeName.toLowerCase() === "select" ) {
+ } else if ( jQuery.nodeName( elem, "select" ) ) {
val = elem.selectedIndex;
}
@@ -798,7 +798,7 @@ if ( !jQuery.support.changeBubbles ) {
click: function( e ) {
var elem = e.target, type = jQuery.nodeName( elem, "input" ) ? elem.type : "";
- if ( type === "radio" || type === "checkbox" || elem.nodeName.toLowerCase() === "select" ) {
+ if ( type === "radio" || type === "checkbox" || jQuery.nodeName( elem, "select" ) ) {
testChange.call( this, e );
}
},
@@ -808,7 +808,7 @@ if ( !jQuery.support.changeBubbles ) {
keydown: function( e ) {
var elem = e.target, type = jQuery.nodeName( elem, "input" ) ? elem.type : "";
- if ( (e.keyCode === 13 && elem.nodeName.toLowerCase() !== "textarea") ||
+ if ( (e.keyCode === 13 && !jQuery.nodeName( elem, "textarea" ) ) ||
(e.keyCode === 32 && (type === "checkbox" || type === "radio")) ||
type === "select-multiple" ) {
testChange.call( this, e );