If you have element 1 with id = 'y' and you want all its [immediate] children to have class = 'x'
$("#y > .x").each(function(){stuff]);
If you want all decoders id = 'y' (and not just right away), you should:
$("#y").find(".x").each(function(){stuff});
Obviously, you could make it smarter (and better) by adding element types if you know what they are. For example, if you want only children of the type, then:
$("#y > a.x").each(function(){stuff]);
Hope you have in mind.
source
share