KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Do these two snippets of code do identical things? If yes, when should one be used over the other? (besides when you need to do something involving i or value ) $("foo").each(function(i,value) { $(this).empty(); }); vs. $("foo").empty(); In general can it be assumed that $("foo").someMethod() means "run somemethod() on each element that matches the selector, except if the name of the method is each ? (ie each is a special case)
Tags (comma-separated)
Save Edits
Cancel