What is the syntax for accessing the children of a class, where the class is a variable?
The html structure is multiple divs like this:
<div class="class1 class2 class3">
<p class="x"> lorem</p>
<p class="y"> ipsum</p>
<p class="z"> yadda</p>
</div>
The function does two color changes before going to 'display:none',
function exIt(cl) {
$(cl + ' > p').animate({color:"#ddd"}, 600, function() {
$(cl + ' > p').delay(800).animate({color:"#333"}, 1600, function() {
$(cl + ' > p').delay(800).hide();
});
});
}
called with "exIt('.class1');"
(There's a structural reason for accessing the child <p> tags, rather than just the parent <div>s. Some <p> tags in some
<div>s will have previously had a style change applied: if the changes are now applied only to the parents, some children won't change… at least not till they're hidden).
Anyway: this code doesn't work, doesn't generate a FF error message, and doesn't stop subsequent chained functions from operating. So it can't be far off; and the syntax $(cl + ' > p') works ok in another function.