This is the Fiddle.
The problem is that, when you click on the button to close the slide out box, there is a glitch. I don’t know how to fix it.
If someone could help me out that would be great. thanks!
var mouse_is_inside = false;
$(document).ready(function(){
$('#box').hover(function(){
mouse_is_inside=true;
}, function(){
mouse_is_inside=false;
});
$("body").mouseup(function(){
if(! mouse_is_inside) $('#box').slideUp();
});
});
That’s the code, if it helps anyone.
Use
slideToggleinstead:Fiddle: http://jsfiddle.net/9spzQ/10/