Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/dart/3.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
结合jquery淡出和scrollTop:dods';不完全褪色_Jquery_Fadeout_Scrolltop - Fatal编程技术网

结合jquery淡出和scrollTop:dods';不完全褪色

结合jquery淡出和scrollTop:dods';不完全褪色,jquery,fadeout,scrolltop,Jquery,Fadeout,Scrolltop,我在全屏画廊的底部放置了一个“向下滚动”按钮。(全屏画廊下方有内容。) 请转到我的页面,以便您自己查看 我的问题并不具体,但这就是我正在使用的。因此,我使用Galleria API创建了一个新元素,并将其附加到Galleria容器中 然后我在这个元素上使用scollTop,然后淡出(在向元素添加ID、其他类和一些HTML之后): 在画面之外(留下淡出),元素确实完全淡出 有人能帮忙吗?也许可以试着这样做?如果同时执行这两项操作导致出现问题,则在滚动完成后会出现淡出: this.$('scroll

我在全屏画廊的底部放置了一个“向下滚动”按钮。(全屏画廊下方有内容。)

请转到我的页面,以便您自己查看

我的问题并不具体,但这就是我正在使用的。因此,我使用Galleria API创建了一个新元素,并将其附加到Galleria容器中

然后我在这个元素上使用scollTop,然后淡出(在向元素添加ID、其他类和一些HTML之后):

在画面之外(留下淡出),元素确实完全淡出


有人能帮忙吗?

也许可以试着这样做?如果同时执行这两项操作导致出现问题,则在滚动完成后会出现淡出:

this.$('scrollnote').attr('id', 'scrollnotecontainer').html("<h6>Scroll down</h6>").addClass('hide-for-touch').click(function(){
    $('html, body').animate({
        scrollTop: $("#scrollnotecontainer").offset().top,
        complete: function() { $(this).fadeOut(); }
    }, 900);        
});
this.$('scrollnote').attr('id','scrollnotecontainer').html(“向下滚动”).addClass('hide-for-touch')。单击(函数(){
$('html,body')。设置动画({
scrollTop:$(“#scrollnotecontainer”).offset().top,
完成:函数(){$(this).fadeOut();}
}, 900);        
});

也许可以试着这样做?如果同时执行这两项操作导致出现问题,则在滚动完成后会出现淡出:

this.$('scrollnote').attr('id', 'scrollnotecontainer').html("<h6>Scroll down</h6>").addClass('hide-for-touch').click(function(){
    $('html, body').animate({
        scrollTop: $("#scrollnotecontainer").offset().top,
        complete: function() { $(this).fadeOut(); }
    }, 900);        
});
this.$('scrollnote').attr('id','scrollnotecontainer').html(“向下滚动”).addClass('hide-for-touch')。单击(函数(){
$('html,body')。设置动画({
scrollTop:$(“#scrollnotecontainer”).offset().top,
完成:函数(){$(this).fadeOut();}
}, 900);        
});

谢谢。我认为你的答案是正确的,但是我仍然有同样的问题。这让我相信是其他原因导致元素不能正常褪色。我没有设置会导致这个问题的元素,尽管它可能与我在页面上使用基金会(基金会,Zurb.com)的事实有关。不确定虽然-因为它会褪色罚款,如果我删除滚动动作!谢谢我认为你的答案是正确的,但是我仍然有同样的问题。这让我相信是其他原因导致元素不能正常褪色。我没有设置会导致这个问题的元素,尽管它可能与我在页面上使用基金会(基金会,Zurb.com)的事实有关。不确定虽然-因为它会褪色罚款,如果我删除滚动动作!
this.$('scrollnote').attr('id', 'scrollnotecontainer').html("<h6>Scroll down</h6>").addClass('hide-for-touch').click(function(){
    $('html, body').animate({
        scrollTop: $("#scrollnotecontainer").offset().top,
        complete: function() { $(this).fadeOut(); }
    }, 900);        
});