Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Still cannot click on href on touchscreens #200

Open
sitoexpress opened this issue Jan 8, 2016 · 1 comment
Open

Still cannot click on href on touchscreens #200

sitoexpress opened this issue Jan 8, 2016 · 1 comment

Comments

@sitoexpress
Copy link

Hi there,

I'm using smoothdivscroller together with kinetic to move some divs inside a wrapper. Within the div there is an image, around the image there is a href. Something like this.

<wrapper class="film-carousel">
    <div>
         <a href><img></a>
    </div>
    <another div....> <a etcetera> </div>
    <another div....> <a etcetera> </div>
</wrapper>

The problem is: tapping on iPhone/Android phones does not open a link. I managed to find this issue that should be similar to my problem: #153

However, I cannot make it work. Below, the plugin settings i'm using:

$(document).ready(function () {
            $(".film-carousel").smoothDivScroll({
                manualContinuousScrolling: true,
                hotSpotScrollingInterval: 30,
                touchScrolling: true
                        });

             // remove smoothDivScroll hotspots on touchscreen
        var hasTouch;
        window.addEventListener('touchstart', function setHasTouch () {
            hasTouch = true;
                $(".film-carousel").smoothDivScroll({
                    hotSpotScrolling: false,
                });    
        window.removeEventListener('touchstart', setHasTouch);
        }, false);


        $('.film-carousel').kinetic({
                filterTarget: function(target, e){
                if (!/down|start/.test(e.type)){
                return !(/area|a|input/i.test(target.tagName));
                    }
                }
            });
});

Am I doing something wrong?

@pursuitofepic
Copy link

I'm having this issue too. It's really causing a problem with my mobile users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants