Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS not recognising click events

Im using jQuery to create an interactive map. If you click on any of the 6 locations to the left of the map, the map will pan to them and a label with their name appears by the marker. I know my code is quite messy but this is for demo purposes only. So far its all working fine:

http://smartpeopletalkfast.co.uk/gmap2/

Their is some additional functionality. When you click on a marker in the map itself, the name should appear by the marker, and the location name to the left of the map should become bold. This is happening on firefox and chrome but nothing happens on iPad and iPhone.

Ive read about issues with using jQuery's live on iOS but ive tried the workarounds without luck. Thanks

like image 918
Evanss Avatar asked Mar 06 '12 14:03

Evanss


1 Answers

Changing the event listener "click" to "click touchstart" fixed this.

like image 117
Evanss Avatar answered Oct 04 '22 03:10

Evanss