SearchRecent posts
The Random ToolboxDrupal 7 Setting up variables for use in a template (preprocess and process functions) Rendering Drupal 7 fields (the right way) Linux Secure Copy (scp) command Restrict Free Shipping in Magento Quickbooks Text Connection Ticket Cross-Site Request Forgery (CSRF) jQuery Events: MouseOver / MouseOut vs. MouseEnter / MouseLeave Monthly archive
|
Use jQuery to hide a DIV when the user clicks outside of it$('div#personalize-window').hover(function(){ mouse_is_inside = true; }, function() { mouse_is_inside=false; }); $("body").mouseup(function(){ if(! mouse_is_inside) $('div#personalize-window').fadeOut('slow'); }); |