3

The problem I am encountering is that when I test the 300 ms delay by clicking on some buttons on a website, I notice no delay. But when I load the application too phonegap, then I touch the buttons on a tablet, I notice the 300 ms delay directly.. So I am kinda confused that I notice the delay with phonegap but almost nothing when test in on a website... So I wish to check either by using alert or something else that fastclick.js is working on a website, before I load it too phonegap? This will save me time.

I have included this in my main index.html file, fastclick.js

<meta name="viewport" content="width=device-width, initial-scale=1">
<script type='application/javascript' src='js/fastclick.js'></script>
<script type="application/javascript">
    window.addEventListener('load', function() {
    new FastClick(document.body);
    }, false);
</script>
frenchie
  • 51,731
  • 109
  • 304
  • 510
Dler Hasan
  • 233
  • 1
  • 11

1 Answers1

1

Fastclick performs browser detection using the user agent string. In your phonegap app the user agent is different from what a mobile browser would return and thus the fastclick script does not detect that you're on a mobile device. You can modify the user agent and the way to do that is described in the answers on this thread.

Community
  • 1
  • 1
Konstantin Dinev
  • 34,219
  • 14
  • 75
  • 100