Created
March 12, 2014 14:17
-
-
Save yurifrl/9507849 to your computer and use it in GitHub Desktop.
fetch_accordion
This file contains 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
var fetch_accordion = function() { | |
$.getJSON(api_url + 'products/' + product_name_id, null).done(function(json) { | |
var ids = ""; | |
for (var key in json.option_types) { | |
ids += json.option_types[key].id + "," | |
} | |
$.getJSON(api_url + 'option_types/', {ids: ids} ).done(function(json) { | |
console.log(json); | |
}); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment