本网站here的“特色项目”部分有动画效果。Jquery Animate()不起作用
我试图让我的网站,我实际上做了一个月左右的第一次。但现在令人惊讶的是,它根本就没有工作,只是对我来说,弄清楚问题可能是什么。
我在选择错误的库,在我的脚本中是否有问题,或者它是一个错误?
HTML。
<a class="MainMiddleTwoEach MMTE1" href="#" title="This is the title 1">
<label class="MainMiddleTwoLabel1"></label>
<span class="MainMiddleTwoLabel2"></span>
</a>
JS。
$('.MainMiddleTwoEach').mouseenter(function (e) {
pageId = $(this).attr('href');
$(this).children('label').animate({ top: '150px' }, 300);
$(this).children('label').animate({ top: '-100px' }, 300);
$(this).children('span').animate({ top: '20px' }, 300);
$(this).children('span').animate({ top: '230px' }, 300);
}).mouseleave(function (e) {
$(this).children('label').animate({ top: '130px' }, 300);
$(this).children('label').animate({ top: '80px' }, 300);
$(this).children('span').animate({ top: '-10px' }, 300);
$(this).children('span').animate({ top: '55px' }, 300);
});
添,相信我,在我真正的代码,他们设置的位置是:绝对的。但是我的项目仍然没有结果,我认为那里有什么问题,而不是脚本或css。但无论如何谢谢。 – John 2013-03-15 10:27:18
“特色项目”页面不包含任何应该动画的Javascript动画。您可以告诉我们您共享的演示页面有什么问题,而不是提供不能正确表示问题的JSFiddle?给我们一些真正的英特尔人。 – 2013-03-15 10:40:43
我的代码有问题,我试图自己解决它。谢谢你给它时间蒂姆。 – John 2013-03-15 10:59:21