SuckerFish Fade


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. $(document).ready(function(){
  2. $("#nav-one li").hover(
  3. function(){ $("ul", this).fadeIn("fast"); },
  4. function() { }
  5. );
  6. if (document.all) {
  7. $("#nav-one li").hoverClass ("sfHover");
  8. }
  9. });
  10.  
  11. $.fn.hoverClass = function(c) {
  12. return this.each(function(){
  13. $(this).hover(
  14. function() { $(this).addClass(c); },
  15. function() { $(this).removeClass(c); }
  16. );
  17. });
  18. };

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.