<!doctype html>
<html>
<head>
<title>mobile cookbook</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
</head>
<body>
<div id="main">
<div id="someElm">
</div>
</div>
<script src="http://code.jquery.com/jquery-1.5.2.min.js"></script>
<script>
function getLocation(){
navigator.geolocation.getCurrentPosition(showInfo);
}
function showInfo(position){
var latitude = position.coords.latitude;
var longitude = position.coords.longitude;
var accuracy = position.coords.accuracy;
$('#someElm').html('latitude: '+latitude+'<br/>longitude:'+longitude+'<br/>accuracy:'+accuracy);
}
getLocation();
</script>
</body>
</html>