I can't make it all work together. I have phonegap / JQM working with fastclick.js perfectly on iOS. This is a dream. But for some reason, I still get a 300ms delay on Android. I entered some warnings and the code gets called. This is really puzzling. I am testing a maxx motor razor razor.
In my index.html file:
<!DOCTYPE html>
<html>
<head>
...
<script type='application/javascript' src='js/fastclick.js'></script>
</head>
<script>
$(document).on("pagebeforechange", function (e, data) {
FastClick.attach(document.body);
alert('fastclick attached');
var to_page = data.toPage[0].id;
if (to_page == "index") {
$.mobile.pageContainer.pagecontainer('change', 'event-list.html');
e.preventDefault();
}
});
</script>
<body>
<div id="index" data-role="page">
This is the index page.
</div>
</body>
</html>
But that does not work. I also tried installing it as:
window.addEventListener('load', function() {
new FastClick(document.body);
}, false);
Which ones work on iOS but don't seem to affect Android. Any suggestions?
edit: It seems that if I remove the jQuery libraries, it works fine. There must be a conflict somewhere. Any idea what this could be? I am using JQM 1.4.
edit: I also tried using vclick to no avail
$("#test-element").bind('vclick',function() {
$.mobile.pageContainer.pagecontainer('change', 'description.html?lunch_pk=2133',{
transition: "slide",
});
});
...
<h1 id='test-element'> CLICK HERE FOR TEST </h1>
, 300 , , vclick , .
edit: ok, , - JQM-. console.log vclick, , . JQM, , , iOS Android? , , .
. , . Intel, , JQM, .