Hi I have the following code on my website, which causes a div to slide out from the left. This works fine, but when the mouse leaves the area I want to the div to instantly disappear, instead of animating back left again. I have tried many different ways of doing this but none seem to work. I'm sure there is an easy way of doing this. Thanks :)
$(document).ready(function(){
$("#side-nav a").hover(function(){
$text = $(this).html();
$text = "#" + $text + "-box";
$($text).animate({width:'toggle'},450);
});
});