straydogstudio / film_roll

A lightweight jQuery carousel that centers one item at a time on the page.
MIT License
207 stars 60 forks source link

Links are not clickable when TouchSwipe is being used #28

Closed EmrahAkdeniz closed 9 years ago

EmrahAkdeniz commented 9 years ago

Hi. When I include TouchSwipe library in the page, link clicks are prevented. How can I click links while swipe is active? Because the page is accesible by both mobile and desktop users. Thanks.

straydogstudio commented 9 years ago

Do you have a code example, say a gist or a repo, I can use? It will help me get to it sooner...

EmrahAkdeniz commented 9 years ago

To explain in detail, in configureSwipe event, "_this.div.find('a').addClass('fr-no-click');" is being executed so all links in child divs are marked with class 'fr-no-click'.

In "cancelClick" event:

if ($(this).hasClass('fr-no-click')) { event.preventDefault(); return false; }

prevents link click. I am using latest "jquery.touchSwipe.min.js" If I don't include this lib, links work fine,

straydogstudio commented 9 years ago

Thanks for finding this @EmrahAkdeniz. I've just posted a new release (0.1.15) with a fix. It should take care of the problem.