whitebear
whitebear

Reputation: 12423

bxslider slide show shows last page at first for some reason

I am using the bxslider to show the catoon.

    <div class="slideBox">
    <ul class="bxslider">
    <li><img src="{{ asset('bundles/acmetop/images/uniq/img_about_comic01.gif')}}" alt=""></li>
    <li><img src="{{ asset('bundles/acmetop/images/uniq/img_about_comic02.gif')}}" alt=""></li>
    <li><img src="{{ asset('bundles/acmetop/images/uniq/img_about_comic03.gif')}}" alt=""></li>
    <li><img src="{{ asset('bundles/acmetop/images/uniq/img_about_comic04.gif')}}" alt=""></li>
    </ul>

    </div>


<script type="text/javascript">
 $(document).ready(function(){
 $('.bxslider').bxSlider();
 });
</script>

When you load,sometimes first page appears correctly,sometimes the last page appears.

How can I solve this?

I guess it is relevant with the data size of gif.....

{{ asset('bundles/acmetop/images/uniq/img_about_comic04.gif')}} is just the syntax of symfony2

Upvotes: 1

Views: 1227

Answers (1)

VJS
VJS

Reputation: 1017

By default bxslider should always starts with the 1st slide. so it's a bit odd if the last slide is shown first. Check the fiddle

But still to fix it, try using this option explicitly "startSlide"

  $(document).ready(function(){
    $('.bxslider').bxSlider({
     startSlide:0
    });
  });

Upvotes: 1

Related Questions