1jQuery(document).ready(function( $ ) { 2 $('.tickettypecontainer').click(function(event) { 3 // we only do something if the current TT container is not selected yet 4 if (!$( this ).hasClass('selectedtickettype')) { 5 // current Ticket Type ID 6 var ttID = $(this).data('ttid'); 7 // ATD ID 8 var atdID = $(this).data('atdid'); 9 // TT Details 10 var ttData = $(this).data('ttdata'); 11 if (atdID) { 12 13 // TT CONTAINER HANDLING 14 var otherTTContainerSelector = '.tickettypecontainer.' + atdID; 15 var allTTContainerForThisAtd = $(otherTTContainerSelector); 16 // first we remove the selected class on all others 17 allTTContainerForThisAtd.removeClass('selectedtickettype'); 18 // now we add the selected class on the current one 19 //$( this ).addClass('selectedtickettype'); 20 // do not add it the the one we clicked on but on all of same ATD ID and TT-ID 21 // since the bxSlider is creating clones of the slides. 22 $('.tickettypecontainer.' + ttID + '.' + atdID ).addClass('selectedtickettype'); 23 24 // Day Selection Switch 25 // first we deselect all the days 26 var allDaysTTContainerSelector = '.daycontainer.' + atdID; 27 var allDaysForThisATD = $(allDaysTTContainerSelector); 28 // first we remove the selected class on all others 29 allDaysForThisATD.removeClass('selectedday'); 30 if (ttData && ttData.atd_tt_selected_days) { 31 // now we add it back 32 $.each( ttData.atd_tt_selected_days, function( index, value ){ 33 var theSelectedDay = $(allDaysTTContainerSelector + '.'+value); 34 // first we remove the selected class on all others 35 theSelectedDay.addClass('selectedday'); 36 }); 37 } 38 39 // FOOTER handling 40 var allFooterContainersSelector = '.tickettypefootercontainer.' + atdID; 41 var allFooterContainers = $(allFooterContainersSelector); 42 // set all to be invisible 43 allFooterContainers.addClass('invisiblefooterpart'); 44 //make the current one visible only 45 $(allFooterContainersSelector+'.'+ttID).removeClass('invisiblefooterpart'); 46 } 47 } 48 }); 49});
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.