javascript - how to display alert when mouse cursor goes out of window -


i want display alert when mouse goes out of window . http://ezwebsitebiz.com/testing-content/

i want in jquery . how can achived

var currentmousepos = { x: -1, y: -1 };          jquery(document).mousemove(function(event) {              currentmousepos.x = event.pagex;              currentmousepos.y = event.pagey;          });   jquery(document).mouseleave(function() {              var window_width = jquery(window).width();              var window_height = jquery(window).height();                if((currentmousepos.x < window_width) && (currentmousepos.y > 50))                  return true;             alert(currentmousepos.x.tostring());           }) 

replace alert message popup window or fancy box


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -