Add to html on to class with jquery
So I'd like to add html on to every element with a certain class but the
way I call it:
$(".foldUpSection").find(".header").html($(".foldUpSection").find(".header").html()
+ '<div class="miniArrow" style="font-weight:bold;float:
right;display:block;width:21px; height:21px; margin-right:15px"><img
style="height:13px" src="images/rightArrow.png" /></div>');
inserts the code from the first .header.
I tried this but after thinking about it I realize it is obviously
undefined. Is there a way to reference the current instance of the change
in a class wide modification?
No comments:
Post a Comment