
Untitled
By: a guest on
May 3rd, 2012 | syntax:
None | size: 0.80 KB | hits: 15 | expires: Never
function getPriceCategories(eventId, venueId) {
baseUrl = '<c:url value= "/categories.htm?"/>';
jQuery.getJSON(baseUrl + "eventId=" + eventId + "&venueId=" + venueId, function (result) {
$("div#priceCategories").empty();
currentSection = 0;
jQuery.each(result, function (index, value) {
if(currentSection != value.section.id) {
if(currentSection != 0) {
$("div#priceCategories").append("</div>");
}
$("div#priceCategories").append("<h3><a href="#">" + value.section.name + "</a></h3>");
$("div#priceCategories").append("<div><ul>");
currentSection = value.section.id;
}
$("div#priceCategories").append("<li>" + value.category.name + " - $" + value.price + "</li>");
$("div#priceCategories").append("</div>");
});
});
}