Last active
August 29, 2015 14:07
-
-
Save mikekavouras/c9bb92a4e79e230710a5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function gimmeDatJSON(callback) { | |
| $.getJSON(geourl, function(response) { | |
| callback(response); | |
| }); | |
| } | |
| function processResponse(response) { | |
| var lat = response.results[0].geometry.location.lat; | |
| var lng = response.results[0].geometry.location.lng; | |
| // do something with lat & lng | |
| } | |
| $('#submit').bind('click', function() { | |
| gimmeDatJSON(function(response) { | |
| processResponse(response); | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment