I am trying to implement a menu bar that works similarly to the windows task bar. One of property that I want to emulate is hide/show when the mouse goes in the bottom of the page. How can I detect when the mouse is in the bottom of the page?
First of all, is there a plugin for JQuery or similar libraries which already implement this action?
A possible solution is to use a invisible div in the bottom which triggers the event when the mouse gets in. I was wondering if there is a better solution than this.
If using jQuery is not a problem
window.onmousemove= function(e){
if(e.y>= $(document).height()-10)
alert('you did hit the bottom!');
}
Will do. check this Fiddle
note: i've given a 10px breathing space
Update: Fiddle with a taskbar like div - Updated Fiddle
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With