I\'m trying to utilize jQuery\'s built in effect functionality to create a \"drawer\" that slides out from behind a navigation bar, pushing the content below it out of the way.<
The javascript you have in your question update works, but it needs to operate on an element containing your content rather than the content itself.
To see this in action, surround the element #drawer
with another div
:
...
And animate the container:
$('#container')
.css({ marginTop: $('#container').height() * -1 })
.animate({ marginTop: 0 });