After called "unbind" event i'm unable to "bind" it again
Hi, iv'e this simple problem
- $( window ).mousemove(function( event )
- {
- console.log('diocane')
- //some stuffs
- })
- $('#header').mouseleave(function(){$(window).unbind("mousemove"); dimensioniHeaderDefault()})
- $('#header').mouseenter(function(){$(window).bind("mousemove");})
The problem is that on mouseleave the mousemove event for the window object is correctly "unbidden" (i do not see "diocane" into the console)
But once mouseenter again into the header element, it should re-activate the mousemove function.. Instead this doesn't happens.. Why?