I have a floating div that gets displayed, and I want it to be hidden when the user clicks off the div. This would be similar to the .hover() function callback when hoverin
If you want to clear the div when you click somewhere else in the page, you can do something like:
$('body').click(function(event) { if (!$(event.target).closest('#myDiv').length) { $('#myDiv').hide(); }; });