Ver Mensaje Individual
  #2 (permalink)  
Antiguo 16/07/2013, 08:59
Avatar de David
David
Moderador
 
Fecha de Ingreso: abril-2005
Ubicación: In this planet
Mensajes: 15.720
Antigüedad: 19 años
Puntos: 839
Respuesta: efecto solo afecta al primero

Podrías probar algo como esto:
Código Javascript:
Ver original
  1. $(document).ready(function(){
  2.     //  When user clicks on tab, this code will be executed
  3.     $(".tabs li").click(function() {
  4.         //  First remove class "active" from currently active tab
  5.         $(this).siblings().removeClass('active').each(function() {
  6.             // Hide all tab content
  7.             var current_tab = $(this).find("a").attr("href");
  8.             $(current_tab).hide();
  9.         });
  10.  
  11.         //  Now add class "active" to the selected/clicked tab
  12.         $(this).addClass("active");
  13.  
  14.         //  Here we get the href value of the selected tab
  15.         var selected_tab = $(this).find("a").attr("href");
  16.  
  17.         //  Show the selected tab content
  18.         $(selected_tab).fadeIn();
  19.  
  20.         //  At the end, we add return false so that the click on the link is not executed
  21.         return false;
  22.     });
  23. });
__________________
Por favor, antes de preguntar, revisa la Guía para realizar preguntas.