Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var locationButton = $('#send-location');
- locationButton.on('click', function() {
- if (!navigator.geolocation) {
- return alert('Geolocation not supported by your browser');
- }
- navigator.geolocation.getCurrentPosition(
- function(position) {
- console.log(position);
- },
- function() {
- alert('Unable to fetch location');
- }
- );
- });
Add Comment
Please, Sign In to add comment