Reputation: 619
I have two elements, one on the top of another. I want to change position of the absolutely positioned element on button click.
jQuery:
$("#check-button").click(function() {
$("#repair-status").animate({top: "80"}, 1000);
});
It seems pretty easy, but it doesn't work in this case. I guess, something is wrong with the CSS. For more details look at the fiddle: http://jsfiddle.net/iamsvyat/93A9f/9/
Thanks in advance!
P.S. for clarity i put the "repair-status" element on top, in final it would slide from bottom.
Upvotes: 0
Views: 74
Reputation: 83709
is this what you want? http://jsfiddle.net/93A9f/10/
$("#check-button").click(function() {
$("#repair-status").animate({top: "80"}, 1000);
return false;
});
All i did was add return false;
to cancel the default action of a postback on the button click.
Upvotes: 1