2

I am looking for a way to disable the mouse event when my animations start using jquery, and when event start again when animation was done.I know this can be done using a webkit css support.

'pointer-events', 'none'

But it will not work on IE.please help.

Ami
  • 4,241
  • 6
  • 41
  • 75
max
  • 391
  • 6
  • 16
  • What kind of animations do you use? CSS animations or jQuery "manual" animations like `$el.hide(duration)` ? – c-smile Aug 30 '12 at 04:00
  • What do you mean by "disable mouse events"? Do you simply want to stop the page from responding to clicks until after the animation finishes, or do you want to completely hide the mouse pointer, or...? (Could be a bit annoying for the user if they're wanting to click on links and you force them to wait...) – nnnnnn Aug 30 '12 at 04:37
  • i am using combined animations $element.fadeOut(400).animate()... – max Aug 30 '12 at 07:37

1 Answers1

1

If you want to disable the right click event or both mouse click event. If you want to disable the right click event means try with this

$(document).ready(function() {  

     //this one line will disable the right mouse click menu  
     $(document)[0].oncontextmenu = function() {return false;}  

}); 

if you want to disable the mouse click event means refer this

Community
  • 1
  • 1
muthu
  • 5,381
  • 2
  • 33
  • 41
  • This doesn't work in several modern browsers with certain preference settings because they protect against web pages taking over the right-click menu. – jfriend00 Aug 30 '12 at 04:57
  • i am looking for all mouse events including mousewheel – max Aug 30 '12 at 07:39