Hi Everyone!
I am trying to use jQuery to append an image tag to a div only if one of three classes exists, but it doesn't seem to be working. It either appends to all
of the elements or none at all.
Here is the HTML code:
<figure class="donut minus">
<div class="figure-value"></div>
</figure>
Here is the jQuery:
if ($("figure.donut").hasClass("minus") || $("figure.donut").hasClass("plus") || $("figure.donut").hasClass("plus-minus")) {
$(".figure-value").append('<img src="../images/schoolProfile/donut-plus-minus.png" />');
}
Thanks in advance
AVADHESH PATEL
09-Apr-2013