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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

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

android - How to create dynamically Fragment pager adapter -