Foros del Web » Programando para Internet » Javascript »

Porque esto no me funciona en Chrome

Estas en el tema de Porque esto no me funciona en Chrome en el foro de Javascript en Foros del Web. me funciona en todos, hasta en IE6. Me he quedado un poco flipado cuando me funciono en IE6 y el chrome no me funciona. No ...
  #1 (permalink)  
Antiguo 24/02/2012, 13:27
 
Fecha de Ingreso: noviembre-2010
Ubicación: aun no se donde vivir
Mensajes: 112
Antigüedad: 13 años, 5 meses
Puntos: 3
Porque esto no me funciona en Chrome

me funciona en todos, hasta en IE6. Me he quedado un poco flipado cuando me funciono en IE6 y el chrome no me funciona. No se que puede ser. Espero que me podeís ayudar. Un saludo a todos.

Código Javascript:
Ver original
  1. <script type="text/javascript">
  2.  
  3. $(document).ready(function() {
  4.  
  5.     $('#home').click(function(){
  6.         $('#footer').hide();
  7.         $('html').animate({scrollTop: '0'}, 'slow');
  8.         return false;
  9.     });
  10.    
  11.     $('.lista1').click(function(){
  12.         $('#footer').hide();
  13.         $('html').animate({scrollTop: '1114px'}, 'slow');
  14.         return false;
  15.     });
  16.  
  17.    
  18.     $('.lista').click(function(){
  19.         $('#footer').hide();
  20.         $('html').animate({scrollTop: '2138px'}, 'slow');
  21.         return false;
  22.     });
  23.    
  24.     $('#contact1').click(function(){
  25.         $('#footer').show();
  26.         $('html').animate({scrollTop: '3412px'}, 'slow');
  27.         return false;
  28.     });
  29.     $('html').animate({scrollTop: '0'}, 0);
  30.     $('#footer').hide();
  31.    
  32.  
  33.  
  34. });
  35. </script>
  #2 (permalink)  
Antiguo 24/02/2012, 15:21
 
Fecha de Ingreso: noviembre-2010
Ubicación: aun no se donde vivir
Mensajes: 112
Antigüedad: 13 años, 5 meses
Puntos: 3
Respuesta: Porque esto no me funciona en Chrome

Cita:
Iniciado por oliverarthurnardi Ver Mensaje
me funciona en todos, hasta en IE6. Me he quedado un poco flipado cuando me funciono en IE6 y el chrome no me funciona. No se que puede ser. Espero que me podeís ayudar. Un saludo a todos.

Código Javascript:
Ver original
  1. <script type="text/javascript">
  2.  
  3. $(document).ready(function() {
  4.  
  5.     $('#home').click(function(){
  6.         $('#footer').hide();
  7.         $('html').animate({scrollTop: '0'}, 'slow');
  8.         return false;
  9.     });
  10.    
  11.     $('.lista1').click(function(){
  12.         $('#footer').hide();
  13.         $('html').animate({scrollTop: '1114px'}, 'slow');
  14.         return false;
  15.     });
  16.  
  17.    
  18.     $('.lista').click(function(){
  19.         $('#footer').hide();
  20.         $('html').animate({scrollTop: '2138px'}, 'slow');
  21.         return false;
  22.     });
  23.    
  24.     $('#contact1').click(function(){
  25.         $('#footer').show();
  26.         $('html').animate({scrollTop: '3412px'}, 'slow');
  27.         return false;
  28.     });
  29.     $('html').animate({scrollTop: '0'}, 0);
  30.     $('#footer').hide();
  31.    
  32.  
  33.  
  34. });
  35. </script>
bueno este es el html:
Código HTML:
Ver original
  1. <div id="layout">
  2. <header id="header">
  3.   <nav id="nav">
  4.   <ul>
  5.   <li id="home" class="lis"><a href="/"><span>Home</span></a></li>
  6.   <li class="lista1 lis"><a href="/"><span>About me</span></a></li>
  7.   <li class="lista lis"><a href="/"><span>Proyect</span></a></li>
  8.   <li id="contact1" class="lis"><a href="/"><span>Contact</span></a></li>
  9.   </ul>
  10.   </nav>
  11. <!--Start section intro-->
  12. <section id="intro" style="element.style background-position:center 0;}">
  13.   <div class="content">
  14.     <nav class="sub-nav">
  15.       <ul>
  16.         <li class="lista list"><a href="/"><span>Proyect</span></a></li>
  17.         <li class="lista1 list"><a href="/"><span>About me</span></a></li>
  18.       </ul>
  19.     </nav>
  20.   </div>
  21. </section><!--End section intro-->
  22. <!--Start section about-me-->
  23. <section id="about"></section><!--End section about-me-->
  24. <!--Start section work-->
  25. <section id="work"></section><!--End section work-->
  26. <!--Start section Contact-->
  27. <section id="contact"></section><!--End section Contact-->
  28. <footer id="footer"> </footer>
  29. </div><!--End id layout-->
  30. </body>
  31. </html>
  #3 (permalink)  
Antiguo 25/02/2012, 17:01
 
Fecha de Ingreso: noviembre-2010
Ubicación: aun no se donde vivir
Mensajes: 112
Antigüedad: 13 años, 5 meses
Puntos: 3
Respuesta: Porque esto no me funciona en Chrome

alguien de por aqui me puede echar una mano por favor!! que ya me estoy perdiendo con esto

Etiquetas: chrome, funcion, html
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 01:04.