Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/68.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Jquery航路点:多个功能不工作_Javascript_Jquery_Jquery Waypoints - Fatal编程技术网

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航路点?