sourcebitsllc / chocolatechip-ui

Mobile Web App Framework
www.chocolatechip-ui.com
MIT License
616 stars 88 forks source link

Tap event delays #7

Closed sambrucejoseph closed 10 years ago

sambrucejoseph commented 11 years ago

I think the infomous 300ms tap event delay is not working for tabbar.
I'm using Android 4.0, Phonegap 3.0 and the tabbar delay is there.
I'm not very good in JS but i tried to use fastclick library (Github: https://github.com/ftlabs/fastclick ) and nothing is happening.

Could someone help with this?

jrstarke commented 10 years ago

@samdeejay: Can you explain what you tried to do? I did this in my own code this morning, and it seems to work

<script src="js/fastclick.js"></script>
<script>
$(function() {
    FastClick.attach(document.body);
});
</script>

This will only work for things that respond to click events, as the Gestures system handles tap events itself

sourcebits-robertbiggs commented 10 years ago

Why don’t you just use ChocolateChip-UI’s singletp event? It’s only 150 millisecond delay. It works fine on Android for me.

You use it like this:

$(‘#button’).on(‘singletap’, function() { // Do stuff here });

On Nov 16, 2013, at 7:16 AM, jrstarke notifications@github.com wrote:

@samdeejay: Can you explain what you tried to do? I did this in my own code this morning, and it seems to work

— Reply to this email directly or view it on GitHub.