javascript - jQuery iPhone / ios7 click event vs touch -


I have a project and driving me crazy, I have code for geographic location / instruction and it never It also works wonders, but ios7 and I have piled up the research and I think there is an issue with the .click event, my code is below.

  $ (document) .ready (function () {var start_ location; var Destination = "20 Papanui RD, Christchurch Central, Christchurch 8011, New Zealand"; // 'Get-directions'). Click (function (e) {e.preventDefault (); // Check if the browser supports geo positioning (if navigator.jolocation) {// user's current state navigator. Jol Cation. GetCurrentPosition (function (position) {// latitude and latitude var latitude = position.coords.latitude; var in countries R = position.coords get longitude; start position = latitude + "," + longitude; // go toToGoogleMaps function go to GoToGoogleMaps (start location, destination); send destination and destination;}) // geographic status For non-browsers / fallback {// Manually entered postal code start position = $ ('manual location'). Val (); // If the user has entered an initial location, goToGoogleMaps function is in the current location and Send destination if Alms location! = '') {GoToGoogleMaps (starting location, destination); } // and any other fade {$ ('. Non-geolocation') in the manual postcode field. FadeIn (); }} // Go to the Google Maps function - Takes an initial location and destination and sends the query to the Google Maps function goToGoogleMaps (initial location, destination) {window.location = "https://maps.google.com/maps ? Saddr = "+ initial location +" & amp; daddr = "+ destination; }}); });  

HTML:

  & lt ;! - # Container - & gt; & Lt; Div id = "mapcontainer" & gt; & Lt; Div class = "no-geographic location" & gt; & Lt; P class = "warning" & gt; Your browser does not support geolocation. Please enter your postcode and click on the button again. & Lt; / P & gt; & Lt; Input type = "text" placeholder = "enter postcode or address" class = "manual-location" & gt; & Lt; / Div & gt; & Lt; A href = "#" class = "go-directions" & gt; Instruct me & lt; / A & gt; & Lt; / Div & gt; & Lt ;! - / # Container - & gt;  

Now I had a play with Tochch.

  & lt; Script type = 'text / javascript' src = "files / scripts / touche.min.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; $ (Document) .ready (function () {$ ('.- Directions'). ('Click', handlclix);}); & Lt; / Script & gt;  

And all I found was an error handllectics is not defined and some other hackie script with no luck and I'm at the end of the technical ability to fix the problem Please.

I have not seen how your file tree, and how you include the files, and about it :

Try checking this function, it really works correctly. I mean, do something like this:

  & lt; Script type = 'text / javascript' src = "files / scripts / touche.min.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; HandleClicks (); $ (Document) .ready (function () {$ ('.- Directions'). ('Click', handlclix);}); & Lt; / Script & gt;  

and handclicks function put in the alert ('some') to ensure that the function works properly, There is no conflict and the file has been successfully added

Better, you can add touch.INJs and PPL can try to recreate your problem


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -