我想更改我的类名我的页面滚动400从feature-animate div的顶部但我收到此错误。未捕获TypeError:无法读取未定义错误的属性'top'
请参阅此链接,我的代码
https://jsbin.com/zafove/edit?html,js,output
Uncaught TypeError: Cannot read property 'top' of undefined error
if(wScroll > $('.feature-animate').offset().top - 400){
$('.feature-animate').each(function(j){
setTimeout(function(){
$('.feature-animate').eq(j).addClass('isShowing');
},100 * (i+1));
在这行之前,你可以在你的代码中打印'console.log($('。feature-animate'))'并告诉我它在打印什么? – gurvinder372
未捕获的SyntaxError:意外的令牌ILLEGAL –
是在document.ready事件之后调用此代码吗?调用此代码之前,您的DOM是否已经加载? – gurvinder372