0

これは jQuery fancybox ギャラリーのコードです。なぜか閉じるボタンが表示されません。私を助けてください。独自の閉じるボタンを使用したい。背景画像を検査するとブラウザで削除されますが、正しいフォルダにあります。画像に線があります。

$(window).load(function(){ 

// Gallery
if(jQuery("#gallery").length){


    // Fancybox
    jQuery("#gallery li a").fancybox({
        "titleShow" : false,
        "transitionIn"  : "elastic",
        "transitionOut" : "elastic",
                    "showCloseButton" : true
    });


    var totalImages = jQuery("#gallery > li").length, 
        imageWidth = jQuery("#gallery > li:first").outerWidth(true),
        totalWidth = imageWidth * totalImages,
        visibleImages = Math.round(jQuery("#gallery-container").width() / imageWidth),
        visibleWidth = visibleImages * imageWidth,
        stopPosition = (visibleWidth - totalWidth);

    jQuery("#gallery").width(totalWidth);


    jQuery("#gallery-prev").click(function(){
        if(jQuery("#gallery").position().left < 0 && !jQuery("#gallery").is(":animated")){
            jQuery("#gallery").animate({left : "+=" + imageWidth + "px"});
        }
        return false;
    });

    jQuery("#gallery-next").click(function(){
        if(jQuery("#gallery").position().left > stopPosition && !jQuery("#gallery").is(":animated")){
            jQuery("#gallery").animate({left : "-=" + imageWidth + "px"});
        }
        return false;
    });



}

});
4

0 に答える 0