aboutsummaryrefslogtreecommitdiffstats
path: root/src/event
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2007-01-14 21:49:59 +0000
committerJohn Resig <jeresig@gmail.com>2007-01-14 21:49:59 +0000
commit34355cd6986d5939dc711c531263cb561cba5f24 (patch)
tree6903ce9d70aa0c481498183576a5f856d908da29 /src/event
parent866187fff66ef50b9c4b4c47f332f742c7546cc5 (diff)
downloadjquery-34355cd6986d5939dc711c531263cb561cba5f24.tar.gz
jquery-34355cd6986d5939dc711c531263cb561cba5f24.zip
Converted a lot of for loops to use jQuery.each() instead.
Diffstat (limited to 'src/event')
-rw-r--r--src/event/event.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/event/event.js b/src/event/event.js
index 63a8a7cbc..88bbbda2b 100644
--- a/src/event/event.js
+++ b/src/event/event.js
@@ -77,8 +77,9 @@ jQuery.event = {
if ( !element ) {
var g = this.global[type];
if ( g )
- for ( var i = 0, gl = g.length; i < gl; i++ )
- this.trigger( type, data, g[i] );
+ jQuery.each( g, function(){
+ jQuery.event.trigger( type, data, this );
+ });
// Handle triggering a single element
} else if ( element["on" + type] ) {
@@ -467,8 +468,9 @@ jQuery.extend({
// If there are functions bound, to execute
if ( jQuery.readyList ) {
// Execute all of them
- for ( var i = 0; i < jQuery.readyList.length; i++ )
- jQuery.readyList[i].apply( document );
+ jQuery.each( jQuery.readyList, function(){
+ this.apply( document );
+ });
// Reset the list of functions
jQuery.readyList = null;