cycle2 icon indicating copy to clipboard operation
cycle2 copied to clipboard

prev/next in non image cycle jumps one slide?

Open Parcye opened this issue 10 years ago • 6 comments

Hi,

I have setup a cycle; with a prev/next but not with image content but with some divs. But whatever way I go, I see a cycle but end up with the same slide in front when I have just two slides.

Adding a third and it skips the 2nd slide, I get the loop : 1, 3, 2, 1, 3, 2, 1

My code:

                        <div class="cycle-slideshow" 
                            data-cycle-fx="scrollHorz" 
                            data-cycle-timeout="0"
                            data-cycle-prev=".cycle-prev"
                            data-cycle-next=".cycle-next"
                            data-cycle-slides="> div">
                            <div class="slide"><img src="images/bg-home.jpg" width="368" height="272" /><h2>Villa's</h2>
                                <p>Obis dolenis volupta turempe riorers pidessi tori re etum sum nimi, quid maximi, atia pelitio etur simusam ut quidi imil id molor ventenis et as exeroria velessinis accuptatur?</p>
                            </div>
                            <div class="slide"><img src="images/logo.png" width="368" height="272" /><h2>Apparetementen</h2>
                                <p>Obis dolenis volupta turempe riorers pidessi tori re etum sum nimi, quid maximi, atia pelitio etur simusam ut quidi imil id molor ventenis et as exeroria velessinis accuptatur?</p>
                            </div>
                            <div class="slide"><img src="images/slide-bg.png" width="368" height="272" /><h2>Test</h2>
                                <p>Obis dolenis volupta turempe riorers pidessi tori re etum sum nimi, quid maximi, atia pelitio etur simusam ut quidi imil id molor ventenis et as exeroria velessinis accuptatur?</p>
                            </div>
                        </div>

Parcye avatar Mar 26 '14 07:03 Parcye

I am having the same issue. I looked to see if the prevnext plugin or any other conflicting plugin is being loaded and I'm clear. Any follow up on this? *edit In the meantime just sliding back over to trusty ol' cycle1

jdanielus avatar Mar 28 '14 00:03 jdanielus

Can we get a working example in JSFiddle or something? I have tried the above code without issue.

Cheers.

sweetroll avatar Apr 02 '14 06:04 sweetroll

Sounds like a whoopsy. I had the same problem, the person that I got the wordpress template from included the cycle2 js file twice. That's exactly what will happen when you include it twice. I removed the enqueue script from the functions.php file and surprise it works! Then I was like, hmmmm... I don't know where it is loaded first so I took that out and put the enqueue back in. I'm 95% sure that is the problem, I was actually surprised cycle2 didn't break when it was loaded twice. Lol though @ the people that sent me this wordpress template.

kap10g avatar Oct 21 '14 19:10 kap10g

I was having the same problem. It was because the cycle2 plugin was loaded twice.

jienckebd avatar May 28 '15 14:05 jienckebd

You know a plugin is widely used when there are multiple folks (myself included) making the same silly mistake. Whoops!

Thanks all for the quick fix on this, much appreciated.

Ottergoose avatar Jun 16 '15 16:06 Ottergoose

Same issue here.

For me the confusion lay in the fact that the Prev/Next plugin can be downloaded separately - which I had done. I thought I needed the plugin in addition to the main cycle2 plugin file so I had included both.

You will see in the above link it is clearly explained that the main cycle2 file contains all the plugins and that the separate plugins are for use with the the cycle2 "core". My bad - hadn't read the docs properly.

greyskin avatar Aug 01 '19 02:08 greyskin