Matt
Matt

Reputation: 1407

Jssor Fade slideshow isn't working

I am having difficulty getting the Fade Slideshow working on my page. The demo works fine, but as soon as I incorporate it into my files, the fade transition no longer works. The first image disappears and is replaced by the next after the transition duration has elapsed.

I have gone through all of the relevant questions and solutions I could find on SO, and none of them have solved the issue I'm seeing. I have checked in other browsers (my primary browser is chrome) and the slideshow not fading is consistent between them.

Maybe there is something important that I am missing. Any help at all would be greatly appreciated!

HTML

<div id='jssor_container'>
    <div u='loading' id='jssor_loading_container'>
        <div id='jssor_loading_background'></div>
        <div id='jssor_loading_icon'></div>
    </div>
    <div u='slides' id='jssor_slides_container'>
        <div><img u='image' src='images/landscape/02.jpg'></div>
        <div><img u='image' src='images/landscape/03.jpg' /></div>
        <div><img u='image' src='images/landscape/04.jpg' /></div>
        <div><img u='image' src='images/landscape/05.jpg' /></div>
        <div><img u='image' src='images/landscape/06.jpg' /></div>
        <div><img u='image' src='images/landscape/07.jpg' /></div>
        <div><img u='image' src='images/landscape/08.jpg' /></div>
        <div><img u='image' src='images/landscape/09.jpg' /></div>
        <div><img u='image' src='images/landscape/10.jpg' /></div>
        <div><img u='image' src='images/landscape/11.jpg' /></div>
    </div>
    <div u='navigator' class='jssorb05'><div u='prototype'></div></div>
    <span u='arrowleft' class='jssora12l'></span>
    <span u='arrowright' class='jssora12r'></span>
</div>

JS

$(document).ready(function()
{
    var options =
    {
        $AutoPlay: true,
        $AutoPlayInterval: 1500, 
        $SlideshowOptions: { $Class: $JssorSlideshowRunner$, $Transitions: [{ $Duration: 700, $Fade: true, $Opacity: 2 }] },
        $BulletNavigatorOptions: { $Class: $JssorBulletNavigator$, $ChanceToShow: 2, $AutoCenter: 0, $SpacingX: 10, $SpacingY: 10 },
        $ArrowNavigatorOptions: { $Class: $JssorArrowNavigator$, $ChanceToShow: 2 }
    };

    var features_slider = new $JssorSlider$('jssor_container', options);
});

CSS

#jssor_container
{
    position: relative;
    display: inline-block;
    top: 0px;
    left: 0px;
    width: 600px;
    height: 300px;
    margin: auto;
    overflow: hidden;
}

#jssor_loading_container
{
    position: absolute;
    top: 0px;
    left: 0px;
}

#jssor_loading_background
{
    filter: alpha(opacity=70);
    opacity: .7;
    position: absolute;
    display: block;
    background-color: #000000;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
}

#jssor_loading_icon
{
    position: absolute;
    display: block;
    background: url(../images/jssor/loading.gif) no-repeat center center;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
}

#jssor_slides_container
{
    cursor: move;
    position: absolute;
    left: 0px;
    top: 0px;
    width: 600px;
    height: 300px;
    overflow: hidden;
}

.jssorb05 div, .jssorb05 div:hover, .jssorb05 .av
{
    background: url(../images/jssor/b05.png) no-repeat;
    overflow: hidden;
    cursor: pointer;
}

.jssorb05
{
    position: absolute;
    bottom: 16px;
    right: 6px;
}

.jssorb05 div
{
    background-position: -7px -7px;
    position: absolute;
    width: 16px;
    height: 16px;
}

.jssorb05 div:hover, .jssorb05 .av:hover { background-position: -37px -7px; }
.jssorb05 .av { background-position: -67px -7px; }
.jssorb05 .dn, .jssorb05 .dn:hover { background-position: -97px -7px; }

.jssora12l, .jssora12r, .jssora12ldn, .jssora12rdn
{
    position: absolute;
    cursor: pointer;
    display: block;
    background: url(../images/jssor/a12.png) no-repeat;
    overflow: hidden;
}

.jssora12l
{
    background-position: -16px -37px;
    width: 30px;
    height: 46px;
    top: 123px;
    left: 0px;
}

.jssora12r
{
    background-position: -75px -37px;
    width: 30px;
    height: 46px;
    top: 123px;
    right: 0px;
}

.jssora12l:hover { background-position: -136px -37px; }
.jssora12r:hover { background-position: -195px -37px; }
.jssora12ldn { background-position: -256px -37px; }
.jssora12rdn { background-position: -315px -37px; }

Upvotes: 0

Views: 280

Answers (1)

jssor
jssor

Reputation: 6985

Please use class name to specify css for 'outer container' and 'slides' container.

Please Replace

#jssor_container

with

.jssor_container

Replace

#jssor_slides_container

with

.jssor_slides_container

Replace

<div id='jssor_container'>

with

<div id='jssor_container' class="jssor_container">

Replace

<div u='slides' id='jssor_slides_container'>

with

<div u='slides' id='jssor_slides_container' class="jssor_slides_container">

Upvotes: 1

Related Questions