Javascript Jquery航路点:多个功能不工作
我只能说,我正在测试航路点,一旦我添加了第二个函数,第一个就不再工作了。为什么呢Javascript Jquery航路点:多个功能不工作,javascript,jquery,jquery-waypoints,Javascript,Jquery,Jquery Waypoints,我只能说,我正在测试航路点,一旦我添加了第二个函数,第一个就不再工作了。为什么呢 $(document).ready(function() { $(".black").waypoint(function(){ TweenMax.to(this, 2, {right:"0", ease:Power2.easeInOut}) },{offset:'50%'}); $(".white").waypoint(function(){ TweenMax.to(this, 2,
$(document).ready(function() {
$(".black").waypoint(function(){
TweenMax.to(this, 2, {right:"0", ease:Power2.easeInOut})
},{offset:'50%'});
$(".white").waypoint(function(){
TweenMax.to(this, 2, {left:"0", ease:Power2.easeInOut})
},{offset:'50%'});
});
尝试以下方法。我想知道日志是否会多次显示其调用,但TweenMax无法执行多次
$(document).ready(function() {
$(".black").waypoint(function(direction){
console.log('BLACK');
TweenMax.to(this, 2, {right:"0", ease:Power2.easeInOut})
},{offset:'50%'});
$(".white").waypoint(function(direction){
console.log('WHITE');
TweenMax.to(this, 2, {left:"0", ease:Power2.easeInOut})
},{offset:'50%'});
});
您使用的是哪个版本的jQuery航路点?