Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 3rd, 2012  |  syntax: None  |  size: 0.80 KB  |  hits: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.         function getPriceCategories(eventId, venueId) {
  2.                         baseUrl = '<c:url value= "/categories.htm?"/>';
  3.                         jQuery.getJSON(baseUrl + "eventId=" + eventId + "&venueId=" + venueId, function (result) {
  4.                                 $("div#priceCategories").empty();
  5.                                 currentSection = 0;
  6.                                 jQuery.each(result, function (index, value) {
  7.                                         if(currentSection != value.section.id) {
  8.                                                 if(currentSection != 0) {
  9.                                                 $("div#priceCategories").append("</div>");
  10.                                                 }
  11.                                                 $("div#priceCategories").append("<h3><a href="#">" + value.section.name + "</a></h3>");
  12.                                                 $("div#priceCategories").append("<div><ul>");
  13.                                                 currentSection = value.section.id;                                     
  14.                                         }
  15.                                                 $("div#priceCategories").append("<li>" + value.category.name + " - $" + value.price + "</li>");
  16.                                                 $("div#priceCategories").append("</div>");
  17.                                         });
  18.                                 });
  19.         }