Un usuario pregunt贸 馃憞
Solo uso la barra de desplazamiento de una p谩gina, pero no funciona en vivo.
custom.js:73 Uncaught TypeError: Cannot read property 'top' of undefined
at HTMLAnchorElement.<anonymous> (custom.js:73)
at Function.each (jquery.min.js:2)
at k.fn.init.each (jquery.min.js:2)
at custom.js:71
at dispatch (jquery.min.js:2)
at v.handle (jquery.min.js:2)
var scrollLink = $('.page-scroll');
// Active link switching
$(window).scroll(function () {
var scrollbarLocation = $(this).scrollTop();
scrollLink.each(function () {
var sectionOffset = $(this.hash).offset().top - 150;
//console.log(sectionOffset);
if (sectionOffset <= scrollbarLocation) {
$(this).parent().addClass('active');
$(this).parent().siblings().removeClass('active');
}
});
});
});
Este tema fue modificado hace 5 meses, 3 semanas por.
(@ alegremente)
Hace 5 meses, 3 semanas
Este no es un problema de WordPress. Su c贸digo parece asumir que cada uno de ellos tendr谩 un hash.
(@urmilwp)
Hace 1 semana, 2 d铆as
Muchas gracias
驴Solucion贸 tu problema??
0 / 0