Sergio
Sergio

Reputation: 822

Cycle2 Next/Prev issues with AutoHeight

I am using Cycle2 in a site Im working on. It is a CMS and it is using jquery 1.6.4 which from the get go posed a problem - but got it taken care of with the .on/.bind hack to the cycle2 core. Unfortunately I cannot update jquery at the moment.

The slideshow is working fine after the hack - the Next and Prev buttons work as they should and the thumbnail navigation works fine as well.

The Issue: Some of our images are taller than the rest and with the slideshow as is the taller images would get cut off at the bottom. So I integrated the data-cycle-auto-height="container" built in to Cycle2. Beautiful it works. I click on the taller image thumbnail and the image slideshow auto adjusts to the current image's height. BUT, now with the data-cycle-auto-height="container" height running, I can no longer use the Next/Prev buttons. They are clickable and the hover effect still works, but once clicked nothing happens. If I go ahead and remove the data-cycle-auto-height="container" from the slideshow div, they began to function again. I looked in the console and it is not throwing any additional errors - the only error I get in the console is Uncaught TypeError: $(...).on is not a function(…) which I was getting from the get-go, probably a jquery 1.6 and cycle2 compatibility issue still.

Here is the start of the slideshow div:

<div class="cycle-slideshow"
            data-cycle-timeout="0"
            data-cycle-manual-fx="fade"
            data-cycle-pager="#no-template-pager"
            data-cycle-prev="#tst-prod-prev"
            data-cycle-next="#tst-prod-next"
            data-cycle-loader="wait"
            data-cycle-auto-height="container"
            data-cycle-pager-template=""
            data-cycle-tmpl-regex="\[\[((\.)?.*?)\]\]"
            data-cycle-caption="#tst-custom-caption"
            data-cycle-caption-template=[[title]] >

Any thoughts on what can be causing this issue?

Upvotes: 0

Views: 217

Answers (1)

Sergio
Sergio

Reputation: 822

Fixed it. Some more tweaks in the Cycle2 core - .on -> .bind. Again, this is a hack for jquery version before 1.7.

Upvotes: 0

Related Questions