Posted By

Rembrand on 08/11/10


Tagged

menu navigation


Versions (?)

Basic sliding tab menu


 / Published in: jQuery
 

URL: http://medilab.be/index.php

Get menu tabs to slide up/down when hovering over them. For some reason, it only starts working after you've hovered above a tab first. I should find out why that is.

  1. $(document).ready(function() {
  2.  
  3. $('.menu .slide a').hover(function() { //the mouse in part
  4. $(this).animate({ marginTop: '0px' }, 200); //can be replaced by padding or whatever
  5. },
  6.  
  7. function() { //the mouse out part
  8. $(this).animate({ marginTop: '10px' }, 300);
  9. });
  10.  
  11. });

Report this snippet  

You need to login to post a comment.