torrentfact
torrentfact

Reputation: 1

HTML5 jquery mobile geolocation content

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

Answers (1)

SeanCannon
SeanCannon

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

Related Questions