Check out this jsFiddle example:
http://jsfiddle.net/uM68j/
After clicking on one of the links in the demo, the bar is supposed to smoothly slide to the top. However, instead of animating, it immediately jumps to the top. How can I modify the code to achieve the desired animation effect?
I suspect that the issue lies within the CSS:
JavaScript code snippet:
$(".nav-bar div, .nav-bar div a").click(function () {
$(".nav-bar").animate({
top: "0"
}, "fast");
return false;
});
CSS styling:
.nav-bar {
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 100px;
background: #ededed;
}