Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 8th, 2012  |  syntax: None  |  size: 0.27 KB  |  hits: 4  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Jquery : how to custom a CLICK event?
  2. var SpinningLock = 0;
  3.  
  4. $('#target').keydown(function() {
  5.   SpinningLock++;
  6. });
  7.  
  8. $('#target').keyup(function() {
  9.   SpinningLock = 0;
  10. });
  11.  
  12. $('#target').click(function() {
  13.   if( SpinningLock > 0) return;
  14.   //TODO: implement click action
  15. });