Reputation: 1
I'm new to HTML5 geolocation. I want to display content based on the geolocation using either html5 or jquery mobile. Can someone give me suggestions or example on how to approach the same.
Upvotes: 0
Views: 2964
Reputation: 77956
JQuery mobile example: http://codingisfun.com/archives/128
HTML5 example: http://html5demos.com/geo Basically this:
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(success, error);
} else {
error('not supported');
}
Upvotes: 1