Skip to content
Snippets Groups Projects
Commit ba98a206 authored by Moreau Elise's avatar Moreau Elise
Browse files

get location from navigator

parent 0ee83e1e
No related branches found
No related tags found
No related merge requests found
......@@ -56,4 +56,12 @@ window.onload = function () {
}
})
;
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
$('#latitude-input').val(position.coords.latitude);
$('#longitude-input').val(position.coords.longitude);
$('#location-button').toggleClass('disabled');
});
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment