Even though it seems very easy I am unable to do it.
I have an image inside div and I should move the image up and down not the entire div.
HTML
<div>
<img src="Image/Scope.png" id="indImage" style="height:auto; max-height:80%; width:auto; max-width:90%;" />
</div>
Javascript
$("#moveUp").on('click',function() {
alert($('#indImage').offset());
if(wind_moveup_click != 7){
$('#indImage').animate({
marginTop : "-=2px"
});
});
But the image is not moving up
Whats the mistake i am doing?
Thanks:)