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

Untitled

By: a guest on May 1st, 2012  |  syntax: None  |  size: 0.56 KB  |  hits: 11  |  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 FadeIn/Out Only Works One Time
  2. <div id="test" style="opacity: 0; width: 100px; height: 100px; background-color: red;">
  3. </div>
  4.  
  5. $("#test").mouseenter(function()
  6.                     {
  7.                         $(this).css("opacity","1").fadeIn();
  8.                     });
  9.  
  10. $("#test").mouseleave(function()
  11.                     {
  12.                         $(this).fadeOut();
  13.                     });
  14.        
  15. $("#test").mouseenter(function()
  16.     {
  17.         $(this).fadeTo("slow", 1);
  18.     });
  19.  
  20. $("#test").mouseleave(function()
  21.     {
  22.         $(this).fadeTo("slow", 0);
  23.     });