Jquery $ .each selector

I would like to know what $.each()jquery means ,
What does it select?

Is there an equivalent in the prototype?

+5
source share
5 answers

$.each()picks nothing. This is just a collection iteration utility.

When you do:

$('someSelector').each(function() {
    // do something
});

jQuery internally calls:

jQuery.each( this, callback, args );

... with thisrepresenting a consistent set.

http://github.com/jquery/jquery/blob/master/src/core.js#L231

You can just as easily call it manually.

jQuery.each( $('someSelector'), function() {
    // do something
});
+15
source

I think you should take a look at

jQuery.each ()

From the documentation

$.each() .each(),, , , jQuery . $.each() , (JavaScript ) . , . ( .)

+7

jQuery each :

.each() DOM . DOM, jQuery. , , 0. , DOM, this .

refer.each()

$.each() .each(), , , jQuery. $.each() , , ( JavaScript) . . ( .)

$. each()

+4

jQuery. , . jQuery.each.

+4

$.each() $().each(), jQuery. $.each() , . . ( , Javascript , .) - , . 1 2 3

$.each([52, 97], function(index, value) {
alert(index + ': ' + value);
});

:

0: 52 1: 97

+3

All Articles