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

Untitled

By: a guest on May 4th, 2012  |  syntax: None  |  size: 0.37 KB  |  hits: 12  |  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. How to define and run a function for a hover event?
  2. var hovername = function() {                        
  3.     // do something
  4. }, function() {
  5.     // do something
  6. });
  7.        
  8. var hoverIn = function () {},
  9.     hoverOut = function () {};
  10.  
  11. $('#el').hover(hoverIn, hoverOut);
  12.        
  13. $('#el').hover(function () {}, function () {});
  14.        
  15. somevariable.hover(hovername, // missing 2nd function);