Ver Mensaje Individual
  #4 (permalink)  
Antiguo 24/06/2013, 07:34
Avatar de madman_18
madman_18
 
Fecha de Ingreso: agosto-2010
Mensajes: 792
Antigüedad: 13 años, 9 meses
Puntos: 14
Respuesta: Quitar Scroll de body,html

Ya he encontrado el problema...no me está viniendo de CSS, sino de algo que pensaba que no tenía y se ve que al deshacer algunos cambios, quité el comentario de esa línea.

Mi fallo viene de jQuery (tenéis que mover el tema o tengo que crear uno nuevo?), con una función que me facilitaron en este foro:
Código Javascript:
Ver original
  1. function scrollSuave(id_menu){
  2. //id_menu es el id del menu al que quiero asociarlo
  3.     var asociaMenu = "#"+id_menu+" ul a[href*=#]";
  4.    
  5.     $(asociaMenu).click(function() {
  6.  
  7.      if (location.pathname.replace(/^\//,'') === this.pathname.replace(/^\//,'')
  8.          && location.hostname === this.hostname) {
  9.  
  10.              var $target = $(this.hash);
  11.  
  12.              $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
  13.  
  14.              if ($target.length) {
  15.  
  16.                  var targetOffset = $target.offset().top;
  17.  
  18.                  $('html,body').animate({scrollTop: targetOffset}, 1000);
  19.  
  20.                  return false;
  21.  
  22.             }
  23.  
  24.        }
  25.  
  26.    });
  27. }

En cuanto asocio dicho código, es cuando ya me falla.

Siento la pérdida de tiempo pzin ;) ;) ;) pero pensaba que me vendría todo de CSS
__________________
"Si consigues ser algo más que un hombre, si te entregas a un ideal, te convertes en algo muy diferente"