I want to display alert when the mouse goes out of window . Like http://ezwebsitebiz.com/testing-content/
i want to do this in jquery . how it can be 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 with your popup window or fancy box
How to kill a query running by pd.read_sql and connected by sqlalchemy (or mysql.connector)
Radio and checkbox cannot be checked when inside BootStrap Modal
How can I just get a part of my object including its parent node?.
During testing we noticed that on mobile devices, any number that is displayed starting with a 0 is recognized as a phone number. How can I keep this from happening?.
I am doing a 'quick' css fix for one of our OCD product owners, I have table that is 500px in height, it displays anything from no rows to thousands, the overflow is set to scroll so you can scroll down the list of items. .