Created
July 15, 2014 20:25
-
-
Save ckahle33/bf6ba99ea4cb48a195e0 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 mlgGetCoreList () { | |
| var cores = ''; | |
| $.ajax({ | |
| type: "GET", | |
| url: 'http://qa.mylittlegolfer.com/prolibapi/v1/core/?format=json', | |
| dataType: "json", | |
| // data: { | |
| // action: "mlg_get_core_list", | |
| // }, | |
| success: function( json, status, jqXHR ) { | |
| try { | |
| cores = $.parseJSON(json); | |
| mlg_core_cards( cores ); | |
| } catch( err ) { | |
| mlg_ajax_caught_error("There was an unexpected error during the core list retrieval attempt. Please try again.", err, jqXHR ); | |
| return false; | |
| } | |
| }, | |
| // code to run if the request fails; the raw request and | |
| // status codes are passed to the function | |
| error: function( xhr, status, errorThrown ) { | |
| mlg_ajax_error_thrown( xhr, status, errorThrown ); | |
| return false; | |
| }, | |
| // code to run regardless of success or failure | |
| complete: function( xhr, status ) { | |
| // Do nothing | |
| } | |
| }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment