jQuery - each()

each() acts as a loop.  It will loop through any collection you provide it like in this obnoxious demo and execute a function.

1 2
3 4
5 6

 


var content = "";
$('#DemoTable td').each(function () { content+= this.innerHTML + "<br />"; });
$("#demo1").html(content);