Skip to content

Instantly share code, notes, and snippets.

@yurifrl
Created March 12, 2014 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yurifrl/9507849 to your computer and use it in GitHub Desktop.
Save yurifrl/9507849 to your computer and use it in GitHub Desktop.
fetch_accordion
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