【发布时间】:2016-05-17 09:11:57
【问题描述】:
我想更改我的班级名称,我的页面从功能动画 div 顶部滚动 400,但我收到此错误。
请查看此链接以获取我的代码
https://jsbin.com/zafove/edit?html,js,output
未捕获的类型错误:无法读取未定义错误的属性“顶部”
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'))并告诉我它在打印什么吗? -
Uncaught SyntaxError: Unexpected token ILLEGAL
-
这段代码是在 document.ready 事件之后调用的吗?在调用此代码之前,您的 DOM 是否已经加载?
标签: javascript jquery css