I’m trying to write 50% of body height as the addition: .scrollTop() + 50%}
rather than .scrollTop() + 200}
So when the mouse leaves the #tail
div snaps back to half the window height.
.bind('mouseleave', function(){
$ ('#wrapper').unbind('mousemove');
$ ('#tail').animate({top:$ ('body').scrollTop() + 50%},300)
});
Whats the correct way to add a percent value?
Thanks