1

嗨,你好,我实际上是 jquery 的新手,最近遇到了关于跨浏览器的问题。当我在编辑后尝试使用 mozilla firefox 时,jquery 自定义内容滚动条冻结了我的 div,使其无法滚动。有什么不对?在我放置流量滑块之前,它就像 Mozilla firefox 上的魅力一样工作。即使我删除了流量滑块功能,它仍然冻结。在 chrome 中一切正常。

我知道这可能是因为我的 nooby 错误。我能做些什么来解决它吗?或者可能有人帮我修复代码?

这是我的javascript代码:

$(function() {
          jQuery(document).ready(function($) {
            $(".slider-horizontal").FlowSlider({
                infinite: true,
                animation: "Accelerating",
                controllers: ["HoverCenter"],
                controllerOptions: [{
                    center: 100,
                    mouseStart: 300,
                    mouseEnd: 100
                }]
            }); 
        });
$(window).load(function() {
  $("#newboxes5, .gallery_container").mCustomScrollbar({
  advanced: {
updateOnContentResize: true
}
});

$(".gallery_container").mCustomScrollbar({
    horizontalScroll:true
});

$("#newboxes5").mCustomScrollbar("update");
});

});

        function slideSwitch() {
        var $active = $('#slideshow IMG.active');

        if ( $active.length == 0 ) $active = $('#slideshow IMG:last');

        var $next =  $active.next().length ? $active.next()
            : $('#slideshow IMG:first');

        $active.addClass('last-active');

        $next.css({opacity: 0.0})
            .addClass('active')
            .animate({opacity: 1.0}, 1500, function() {
                $active.removeClass('active last-active');
            });
        }

        $(function() {
            setInterval( "slideSwitch()", 3000 );
        });
        function showonlyone(thechosenone) {
     $('.newboxes, .gallery_box').each(function(index) {
          if ($(this).attr("id") == thechosenone) {
               $(this).show(200);
          }
          else {
               $(this).hide(200);
          }
     });

}
4

0 回答 0