Recently, I posted a query regarding an error in my jQuery code. While that was resolved, I am now facing a new challenge where the code appears fine but fails to execute upon clicking "#equals." Below is the relevant excerpt from my code.
HTML
<div id="goDown">
<img src="waterTankWaterREAL.png" id="water">
</div>
<input type="submit" name="equals" value="Solve" id="equals">
CSS
#water {
position: relative;
left: -4px;
z-index: 1;
opacity: 0;
width: 200px;
}
"#goDown" does not have any additional CSS styling.
JavaScript/jQuery
$(document).ready(function() {
$("#equals").click(function() {
$('#water').animate({'margin-top': '-200px', 'opacity': .65}, 2000);
});
});
It's worth noting that I added an "alert()" within the $("#equals") function and can confirm its functionality separately.