Get some elements:
elements = $(".class_or_any_other_descriptor");
or get some parent element, then its children:
parent = $("#some_descriptor");
elements = parent.children();
Now you can iterate them:
$.each(children, function(index, value) {
value.addClass("foo");
});
or
children.each(function() {
$(this).addClass("foo");
});
Please see:
http://api.jquery.com/children/[
^],
http://api.jquery.com/jQuery.each/[
^],
http://api.jquery.com/each/[
^],
http://api.jquery.com/category/selectors/[
^],
http://api.jquery.com/id-selector/[
^].
—SA