I would like to know what $.each()
stands for in jquery,
What is it selecting?
Is there an equivalent in prototype?
$.each()
isn't selecting anything. It is just a utility to iterate over a collection.
When you do:
$('someSelector').each(function() {
// do something
});
jQuery is internally calling:
jQuery.each( this, callback, args );
...with this
representing the matched set.
http://github.com/jquery/jquery/blob/master/src/core.js#L231
You could just as easily call it yourself manually.
jQuery.each( $('someSelector'), function() {
// do something
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With