I have a div with the id ring-preview, it has a unspecifed number of img elements with the class stone-preview inside it.
div
ring-preview
img
stone-preview
You're looking for the .each() method. For example:
$('.ring-preview').children('img').each(function(i) { $(this).rotate(ring.stones[i].stone_rotation); });
If the elements aren't direct children, you'll need to call .find instead of .children.
.find
.children