Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/71.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 chrome和firefox中的转盘性能不佳_Javascript_Jquery_Google Chrome_Carousel_Lag - Fatal编程技术网

Javascript chrome和firefox中的转盘性能不佳

Javascript chrome和firefox中的转盘性能不佳,javascript,jquery,google-chrome,carousel,lag,Javascript,Jquery,Google Chrome,Carousel,Lag,我是一名javascript学习者,我正在努力解决以下问题。我使用带有溢出滚动条的容器创建了一个旋转木马。在里面,我有一个包含我所有物品的旋转木马分区。 除了一个在我的“焦点”内的项目外,我的所有项目的不透明度均为0.3。当用户滚动时,我有一个脚本来检查哪个项目在我的“焦点”内 我将非常感谢一些建议,因为我正在尽可能多地学习这方面的知识 @Mathletics Ha,我刚刚点击发布了相同的链接。好的,我应该更具体地说明我的目标和抱负。这是另一个问题,它应该会对我在这里发布的问题有所帮助。非常感谢

我是一名javascript学习者,我正在努力解决以下问题。我使用带有溢出滚动条的容器创建了一个旋转木马。在里面,我有一个包含我所有物品的旋转木马分区。 除了一个在我的“焦点”内的项目外,我的所有项目的不透明度均为0.3。当用户滚动时,我有一个脚本来检查哪个项目在我的“焦点”内


我将非常感谢一些建议,因为我正在尽可能多地学习这方面的知识

@Mathletics Ha,我刚刚点击发布了相同的链接。好的,我应该更具体地说明我的目标和抱负。这是另一个问题,它应该会对我在这里发布的问题有所帮助。非常感谢您的帮助!我爱你;)
var ItemToFocus = function(){
    if(  MousewheelActive == 1  ){

        First_Item_Offset = $Active_Carousel_Item.first().offset().left;
        First_Item_Offset = -First_Item_Offset;
        Focus_Point = 0.45 * Window_Width;
        Carousel_Position = First_Item_Offset + Focus_Point;
        Width = $Item.first().width();
        Length = $Active_Carousel_Item.length;

        for( i=0; i < Length; i++ ){
            Right = (i+1) *Width;
            Left = Right-Width;
            if( Right > Carousel_Position && Left < Carousel_Position ){

                if( ! $Active_Carousel_Item.eq(i).hasClass("Carousel_Item_Focus_Instant") ){
                    $Active_Carousel_Item.eq(i).addClass("Carousel_Item_Focus_Instant");

                    clearTimeout(Introduction_Timer);
                    Introduction_Timer = setTimeout(function(){
                        $Carousel_Item_Focus_Instant = $(".Carousel_Item_Focus_Instant");
                        $Carousel_Item_Focus_Instant.find(".Introduction").show();
                    },600); 

                } else if( $Active_Carousel_Item.eq(i-1).hasClass("Carousel_Item_Focus_Instant") ){
                    $Active_Carousel_Item.eq(i-1).removeClass("Carousel_Item_Focus_Instant").addClass("Carousel_Item_Blur").find(".Introduction").hide();
                } else if( $Active_Carousel_Item.eq(i+1).hasClass("Carousel_Item_Focus_Instant") ){
                    $Active_Carousel_Item.eq(i+1).removeClass("Carousel_Item_Focus_Instant").addClass("Carousel_Item_Blur").find(".Introduction").hide();   
                }

            }

        }

    }
http://192.185.4.96/~andrewn8/