1

我遇到了最奇怪的错误。

当您加载此链接http://travisjterry.com/SBCorp/index.php

轮播不会在页面底部附近加载,但如果您从导航单击徽标或主页,它会加载。此外,如果您执行 command + r ,它会破坏狂欢。

这似乎只是 Windows 和 mac 上的 Chrome 和 Safari 中的一个问题。

任何人都知道可能导致这种情况的原因是什么?我被这个难倒了,请帮忙!

4

5 回答 5

1
if(jQuery("#gallery-thumb").length){
jQuery('#gallery-thumb').carouFredSel({
        responsive: true,
        auto: false,
        width: '100%',
        prev: '#prevy',
        next: '#nexty',
        pagination: "#pager2",
        scroll: 1,
        items: {
            width: 150,
            height: 130,    //  optionally resize item-height
            visible: {
                min: 1,
                max: 5
            }
        }

    });
}
于 2013-09-12T19:14:32.483 回答
0

我不确定,但可能与以下内容有关:

onMouseOut=src="images/productbump/booth.png"
onMouseOver=src="images/productbump/booth_hover.png"

通常对于图像交换,你会使用类似的东西:

<img id="img2"

    onmouseover="imgChange2('../images/image1.gif')" 
    onmouseout="imgChange2('../images/image2.gif')" 

    src="../images/image2.gif">

</img>

使用 javaScript:

function imgChange2( img ) { document.img2.src = img; }

更新

caroufredsel_wrapper的指定高度为 23px:

<div class="caroufredsel_wrapper" style="display: block; text-align: start; float: 
none; position: relative; top: auto; right: auto; bottom: auto; left: auto; z-index: 
auto; width: 618px; height: 23px; margin: 0px; overflow: hidden;">

并设置为overflow:hidden;

将这些参数更改为适当的数字应该可以解决问题。

于 2013-07-03T21:20:43.423 回答
0

问题在于您的高度设置与 carofredsel_wrapper 内联。您将其设置为 20px 高度并隐藏溢出,因此图片不适合。将该数字更改为与照片一样大的数字,它会正常工作..我使用了 100px

于 2013-07-03T21:22:33.907 回答
0

第一次加载页面时,.caroufredsel_wrapper分配的高度为 25px。这还不够。所以实际上它是在开始时加载的,但是高度是关闭的。也许您正在设置高度,在页面完全加载之前?

于 2013-07-03T21:23:12.790 回答
0

我认为当您通过 jquery 初始化滑块时,您的身高已被注释掉。

在初始化#gallery-thumb 时第二次调用插件时,尝试将高度设置为固定为 130,如下所示。我认为这会奏效。

if(jQuery("#gallery-thumb").length){
    jQuery('#gallery-thumb').carouFredSel({
            responsive: true,
            auto: false,
            width: '100%',
            prev: '#prevy',
            next: '#nexty',
            pagination: "#pager2",
            scroll: 1,
            items: {
                width: 150,
                height: 130,    //  optionally resize item-height
                visible: {
                    min: 1,
                    max: 5
                }
            }

        });
    }
于 2013-07-03T21:48:46.573 回答