Skip to content

Instantly share code, notes, and snippets.

@sminnee
Created November 20, 2009 04:11
Show Gist options
  • Select an option

  • Save sminnee/239280 to your computer and use it in GitHub Desktop.

Select an option

Save sminnee/239280 to your computer and use it in GitHub Desktop.
if(isRecon) getReconData(updateGraph);
else getGuardianData(updateGraph);
function updateGraph(graphData) {
// only needs to be implemented once
}
function getReconData(callback) {
$.get(
success: function(data) {
theActualData = data.somethingSimpler;
callback(theActualData)
}
)
}
function getGuardianData(callback) {
$.get(
success: function(data) {
theActualData = data.innerBit.something;
callback(theActualData)
}
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment