Jquery's selector syntax (css3 selectors supported!) makes it easy for your js to work with whatever html you have, so you may want to look into that.