Posted By

smartweb on 08/20/10


Tagged

Onglet-1-Jquery


Versions (?)

Onglet-1- JQuery


 / Published in: jQuery
 

  1. jQuery.fn.log = function(msg){
  2. console.log("%s: %o", msg, this);
  3. return this;
  4. };
  5. $(document).ready(function(){
  6. var listeProd = $("#nav>li>a"); // selectionner le fils direct
  7. listeProd.hover(function(e){
  8. listeProd.each(function(){
  9. $(this).removeClass('current');
  10.  
  11. $(this).next().css("display", "none");
  12.  
  13. })
  14.  
  15. $(this).addClass('current');
  16. $(this).next().css("display", "block");
  17.  
  18. })
  19. });

Report this snippet  

You need to login to post a comment.