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

preventDefault on tap events #71

Open
massimocolella opened this issue Jun 28, 2013 · 1 comment
Open

preventDefault on tap events #71

massimocolella opened this issue Jun 28, 2013 · 1 comment

Comments

@massimocolella
Copy link

hi,
trying to understand:

        $$('a.add_fav').on('touchstart', function(e) {
            e.preventDefault();
            mycodehere();
        });

seems to correctly prevent link to be executed, while

        $$('a.add_fav').tap(function(e) {
            e.preventDefault();
            mycodehere();
        });

does take the browser to the a href attribute.
tested on safari IOS 6.x, iphone 4.
is it right?
more in general, which method should be used with quojs to prevent "a" links to be executed?
thanks in advance, you did really a great job with quojs.

@TNT-RoX
Copy link
Contributor

TNT-RoX commented Nov 8, 2013

e.stopImmediatePropagation();

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