jquery - Javascript Execute message when mouse is on left side of page -
jquery - Javascript Execute message when mouse is on left side of page -
does know how create when the mouse close or @ left side of page send message in javascript. when take mouse , move close left side utilize alert("example");.
thanks, appreciate help.
working fiddle fiddle
html
<div class="menu hide"></div>
script
call custom function when mouse leaving ,and in function ,if mouse hovered left side of window @ to the lowest degree 20px task want.
var menu = $('.menu'); var menutimeout; $(window).on('mousemove', mousemovehandler); function mousemovehandler(e) { if (e.pagex < 20 || menu.is(':hover')) { // show menu if mouse within 20 pixels left or hovering on cleartimeout(menutimeout); menutimeout = null; alert("left side") } }
javascript jquery html css
Comments
Post a Comment