Help please.... Javascript (Jquery) -> TypeError: $(...).offset(...) is undefined
I'm from Brazil. My english isn't very good rsrs
Error in my console Javascript
error in Firefox -> TypeError: $(...).offset(...) is undefined
error in Chrome -> Uncaught TypeError: Cannot read property 'top' of undefined
This work was not that I did. I just maintenance.
Can anyone help me, I'll send the error code excerpt
$(document).ready(function(){
$(window).scroll(function() {
clearTimeout($.data(this, 'scrollTimer'));
$.data(this, 'scrollTimer', setTimeout(function() {
var eTop = $('section.campanhas .clube-theodor').offset().top; //get the offset top of the element
if(eTop - ($(window).scrollTop()+$(window).height()) < 0) {
$('section.campanhas .conteudo h2.campanha.clube-theodor').addClass("animated fadeInLeft visibility");
$('section.campanhas .conteudo h2.campanha.theodor-personalizado').addClass("animated fadeIn visibility");
$('section.campanhas .conteudo h2.campanha.theodor-itinerante').addClass("animated fadeInRight visibility");
}
}, 0));
});
});