$("#button").click(function(){
if($("#window").css('top') == '0%'){
$("#window").stop().animate({top:'-100%'},1000);
}
else {
$("#window").stop().animate({top:'0%'},1000);
}
});
it works perfectly in Chrome and Safari, but in Firefox it works partially.
In FF it just works the else situation. identifies that the position isn’t top: '0%' and change to top: '0%', but doesn’t change to top: '-100%' if is top: '0%'
Please suggest.
remove percent symbol and use
top: 0;