The 'if' scenario works but the else if does not. I am trying to toggle the images on the click of class="show-real-pixels"
<div class="image not-hidden">
<img src="img/healthyout/WF-onboard.png">
</div>
<div class="image hidden">
<img src="img/healthyout/HF-onboard.png">
</div>
<div class="btn pull-right show-real-pixels">show real pixels</div>
$(".show-real-pixels").click(
function () {
if ($(".image").hasClass("hidden")) {
$(".image").removeClass("hidden").addClass("not-hidden");
}
else if ($(".image").hasClass("not-hidden")) {
$(".image").removeClass("not-hidden").addClass("hidden");
}
});