1/* Retrieve Ticket Availability 21. loop thru each <tr> in the instances table 32. grab the inst-id 43. set the URL 54. go get the availability from Spektrix for that instance 65. display it 7*/ 8 9var performances = $("#performances"); 10 11if (performances) { 12 13 $(function() { 14 15 var theatre = performances.data('theatre'); 16 17 $("#instances tr").each(function(){ 18 19 var id = $(this).data('inst-id'), 20 td_avail = $(".available", this), 21 td_book = $(".book a", this); 22 23 data = { 24 id:id, 25 theatre:theatre 26 }; 27 28 //console.log(data); 29 30 $.ajax({ 31 type: 'POST', 32 url: '/ajax-availability.php', 33 data: data 34 }).done(function(response) { 35 36 // sold out 37 if (response === 'sold out') { 38 td_book.hide(); 39 td_avail.html('<span class="badge badge-danger">Sold Out</span>'); 40 } else { 41 td_avail.html(response); 42 } 43 44 45 46 }).fail(function(error) { 47 48 td_avail.html(error); 49 50 }); // end ajax 51 52 }); // and loop 53 54 }); // end ready 55 56} // end length 57 58// the view from seat thing 59function spekShowViewFromSeat(url, tooltip){};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.