Last active
August 29, 2015 14:04
-
-
Save drewrwilson/5550245110ad1b929132 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
jQuery.ajax({ | |
url: 'example.json', | |
dataType: "json", | |
beforeSend: function(){ | |
//do something while the data is loading. eg. $(this).closest('div').html('getting file...'); | |
}, | |
success: function(data) { | |
window.points = data; | |
}, | |
complete: function(){ | |
//do stuff after loading points, eg putItOnAMap(window.points.features) | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment