为什么当我们滚动到第 3 页时,它会像白屏一样出错?

Why when we scroll to the 3rd page it bugs like a white screen?

提问人:displé nam 提问时间:11/8/2023 更新时间:11/8/2023 访问量:33

问:

当我们结束滚动到第 3 页时出现错误的网站 https://staging.sophiepeirano.com/fr/

以及使用机车滚动的脚本

<script type="text/javascript">
    (function () {
                
           const scroll = new LocomotiveScroll({
                 el: document.querySelector('.page-content .elementor-element'),
                 smooth: true,
                     direction: 'horizontal'
                });
        
                const scroll_v = new LocomotiveScroll({
                 el: document.querySelector('.presentation'),
                     smooth: true,
                     direction: 'vertical',
                     getDirection: true
                });
                
                scroll.on('scroll', (args) => {
                    //console.log(args);
                });
        
                scroll_v.on('scroll', (args) => {
                 // Get all current elements : args.currentElements
                 scroll.stop();
                     if( args.direction == 'down' && args.limit['y'] == args.scroll['y'] ) {
                    scroll.start();
                  } else if( args.direction == 'up' && 0 == args.scroll['y'] ) {
                    scroll.start();
                  }
                });
        
    })();    
   
</script>

提前感谢帮助我

javascript html jquery ajax 滚动

评论


答: 暂无答案