is there a possibility to use the mousemove on the \'body\', and avoid at the same time an element of the DOM, like the div \'menu\' ?
is there a possibility to use the mousemove on the 'body', and avoid at the same time an element of the DOM, like the div 'menu' ?
The idea is to show the 'prev' or 'next' arrow in the background, but hide it -> if
开发者_开发知识库we enter in the menu element.
I tried this :
$('body').not('#menu').bind('mousemove', function(e){
but it didn't work out...
Try this:
$('body').bind('mousemove', function(e){
// Your Code to handle Mouse Move Globally.
});
$('#menu').bind('mousemove', function(e){
// Your Code to handle Mouse Move on the #Menu.
//##################
e.stopPropagation();
});
精彩评论