如果元素在视口中完全可见,我正在尝试使用此插件执行动画;有点像灯箱效果。它有点反应......但更不是。不确定我是否使用了正确的方法。有任何想法吗?
$(window).bind("resize mousewheel scroll scrollStop", function() {
if($(".tailor .content").is(":within-viewport")) {
$(".tailor").animate({opacity:'1.0'}, 900, 'easeInOutQuart');
}
else {
$(".tailor").animate({opacity:'0.8'}, 900, 'easeInOutQuart');
}
});