Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/01/2012, 10:22
Avatar de Carlmycol
Carlmycol
 
Fecha de Ingreso: diciembre-2007
Ubicación: Los Teques, Venezuela
Mensajes: 240
Antigüedad: 16 años, 5 meses
Puntos: 3
Click() en jquery no reacciona, "efecto" de pestañas

Experimentando un poco me topé con lo siguiente, voy hacer dos pestañas con fotos de modelos y pues, el evento ready en $(document) funciona a la perfeccion mas los otros dos, no se inmutan, es decir:

$("#hombres").click ... y $("#mujeres").click
No funcionan, por alguna razón que.. no entiendo o.O

Si alguien me tiende una mano le agradceria de corazon n.n

Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <style type="text/css">
  4. @font-face{  
  5. font-family:'Futura';  
  6. src: url('css_files/login/FuturaStd-Medium.otf') format('opentype');  
  7. }
  8.  
  9. body
  10. {
  11.     background:black;  
  12. }
  13. #top
  14. {
  15.     width:100%;
  16.     height:228px;
  17.     background:url(css_files/index/logo.png) center bottom no-repeat;
  18. }
  19. #wrapper
  20. {
  21.     width:960px;
  22.     height:auto;
  23.     margin:0 auto 0 auto;  
  24. }
  25.  
  26. #menu, #menu ul
  27. {
  28.     padding:0;
  29.     margin:0;
  30.     list-style:none;
  31. }
  32. #menu ul li
  33. {
  34.     /* Duracion de transicion 100% a 0% */
  35.     -webkit-transition-duration: 500ms; /* Google Chrome y Safari */
  36.     -o-transition-duration: 500ms;      /* Opera */
  37.     -ms-transition-duration: 500ms;     /* Internet Explorer */
  38.     -moz-transition-duration: 500ms;    /* Mozilla Firefox */
  39.     background:#2E2E2E;
  40.     float:right;
  41.     padding:10px 20px 10px 20px;
  42.     color:white; text-decoration:none;
  43.     font-family:'Futura', Tahoma, Geneva, sans-serif;
  44.     letter-spacing:-1px;
  45.     margin-left:5px;
  46.     text-transform:uppercase;
  47.     cursor:pointer;
  48. }
  49.  
  50. #menu ul li:hover
  51. {
  52.         /* Duracion de transicion 100% a 0% */
  53.     -webkit-transition-duration: 500ms; /* Google Chrome y Safari */
  54.     -o-transition-duration: 500ms;      /* Opera */
  55.     -ms-transition-duration: 500ms;     /* Internet Explorer */
  56.     -moz-transition-duration: 500ms;    /* Mozilla Firefox */
  57.     background:#8D8D8D !important;
  58. }
  59. <script src="css_files/jquery.js"></script>
  60.  
  61.     $("#content").click( function() {
  62.  
  63.         $("#content_mujeres").hide(500);
  64.  
  65.         $("#content_hombres").show(700);
  66.  
  67.     } );
  68.  
  69.     $("#mujeres").click( function() {
  70.  
  71.         $("#content_hombres").hide(500);
  72.  
  73.         $("#content_mujeres").show(700);
  74.  
  75.     });
  76.     $(document).ready( function() {
  77.  
  78.         $("#content_hombres").hide(300);
  79.  
  80.     } );
  81.  
  82.  
  83. <meta content="text/html;" http-equiv="content-type" charset="utf-8">
  84. <title>Galería</title>
  85. </head>
  86.      <div id="wrapper">
  87.  
  88.                <div id="top">
  89.  
  90.                </div>
  91.      
  92.  
  93.                <div id="content">
  94.                 <div id="menu">
  95.                          <ul>
  96.                               <li id="mujeres">Mujeres</li>
  97.                               <li id="hombres">Hombres</li>
  98.                          </ul>
  99.                     </div>
  100.                </div>
  101.  
  102.                    
  103.  
  104.                <hr style="clear:both;border:0;visibility:none;">
  105.  
  106.                
  107.  
  108.                <div id="content_hombres">
  109.                   ... </div>
  110.  
  111.                            
  112.  
  113.                <hr style="clear:both;border:0;visibility:none;">
  114.  
  115.                <div id="content_mujeres">
  116.                 ...</div>
  117.  
  118.                <hr style="clear:both;border:0;visibility:none;">
  119.      </div>
  120.  
  121. </body>
  122.  
  123. </html>

Un saludo