malsup / cycle2

2nd gen cycling
899 stars 236 forks source link

slideshow begins before center.js and swipe.js are initiated #736

Open streettb1234 opened 8 years ago

streettb1234 commented 8 years ago

I have a slideshow with the attibute data-cycle-loader="wait" but the slideshow begins to cycle through slides before some plugin scripts are initiated. Also, Depending on how many slides there are, I don't see the slides center in the viewport on iPad (or have the ability to swipe) until approx the 3rd or fourth slide is shown. Anyway to have the slideshow not begin until all slides have downloaded, and swipe.js and center.js have fully downloaded/initiatlized? I thought loader="wait" would accomplish this but it doesn't appear to.

Code:

<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
<script src="js/cycle2.js"></script>
<script src="js/jquery.cycle2.center.js"></script>
<script src="js/swipe.js"></script>```

Slideshow:

```<div class="cycle-slideshow" id="mobile" data-cycle-speed="1200" data-cycle-manual-speed="180"  data-cycle-prev="#prev" data-cycle-next="#next" data-cycle-center-horz=true data-cycle-center-vert=true data-cycle-swipe=true data-cycle-swipe-fx=scrollHorz  data-cycle-loader="wait">

 <img src="proj/thirteen/1_katzen_ext.jpg" >
     <img src="proj/thirteen/2_Katzen-Massachusetts-Ave.jpg" >
      <img src="proj/thirteen/3_Katzen_gallerystair.jpg" >
    <img src="proj/thirteen/4_Katzen_academic-commons.jpg" >
    <img src="proj/thirteen/5_Katzen_two-guys.jpg" >
    <img src="proj/thirteen/6_Katzen_bw-head-shot.jpg" >
    <img src="proj/thirteen/7_Katzen-sketchfinal.jpg" >
</div>```
zakgreene commented 8 years ago

I'm having the same issue. Ideally I'd like to not even have to use loader: "wait", since my slideshows are manual. I need at least the first slide to center right after the image loads.