PageSourceSearch

https://tatersalad.com/wp-content/themes/hello-elementor-child/js/custom.js

js tatersalad.com collected 2026-10-02 05:32:11 UTC 6,654 bytes, 184 lines download raw bytes

1jQuery(document).on("click", ".tourLearnMoreRemove.learnMore", function (e) {
2    e.preventDefault();
3
4    // This is the wrapper for ONE ticket block
5    var $box = jQuery(this).closest(".ticketBoxMain");
6
7    // Only affect elements inside this box
8    $box.find(".tourLearnMoreRemove").hide();
9    $box.find(".tourLearnMoreAdd.cross, .tourLearnMoreAdd.description, .tourLearnMoreAdd.ticketBtn").show();
10    $box.find(".ticketsWrapper").css("width", "100%");
11});
12jQuery(document).on("click", ".tourLearnMoreAdd.cross a", function (e) {
13    e.preventDefault();
14
15    var $box = jQuery(this).closest(".ticketBoxMain");
16
17    $box.find(".tourLearnMoreAdd.cross, .tourLearnMoreAdd.description, .tourLearnMoreAdd.ticketBtn").hide();
18    $box.find(".tourLearnMoreRemove").show();
19    $box.find(".ticketsWrapper").css("width", ""); // or original width
20});
21
22
23
24jQuery(function ($) {
25
26    // Open the expanded panel for that ticket box
27    $(document).on('click', '.js-learn-more', function (e) {
28        e.preventDefault();
29        $(this).closest('.ticketBoxMain').addClass('is-open');
30    });
31
32    // Close the expanded panel
33    $(document).on('click', '.js-close', function (e) {
34        e.preventDefault();
35        $(this).closest('.ticketBoxMain').removeClass('is-open');
36    });
37
38});
39document.addEventListener("DOMContentLoaded", function () {
40
41    const product1 = "/product/pre-sale-access-pass/";
42    const product2 = "/product/number-juan-tequila/";
43
44    const prevBtn = document.getElementById("previous_id");
45    const nextBtn = document.getElementById("next-id");
46
47    const currentURL = window.location.pathname;
48
49    // --- Hide/Show Buttons ---
50    if (prevBtn && nextBtn) {
51        if (currentURL === product1) {
52            // On Product 1 → Show NEXT only
53            prevBtn.style.display = "none";
54            nextBtn.style.display = "block";
55        } else if (currentURL === product2) {
56            // On Product 2 → Show PREVIOUS only
57            nextBtn.style.display = "none";
58            prevBtn.style.display = "block";
59        }
60
61        // --- Click Events ---
62        // Next → Go to Product 2
63        nextBtn.addEventListener("click", function (e) {
64            e.preventDefault();
65            window.location.href = product2;
66        });
67
68        // Previous → Go to Product 1
69        prevBtn.addEventListener("click", function (e) {
70            e.preventDefault();
71            window.location.href = product1;
72        });
73    }
74});
75
76
77// ============================================
78// MULTI-SHOW PANEL FUNCTIONALITY
79// ============================================
80jQuery(function($) {
81    
82    // Delegate click handler for VIEW SHOWS button (in infobox)
83    $(document).on('click', '.view-shows-btn', function(e) {
84        e.preventDefault();
85        e.stopPropagation();
86        
87        var locationKey = $(this).data('location');
88        
89        // Close any open InfoBox
90        if (window.currentInfoBox) {
91            window.currentInfoBox.close();
92        }
93        
94        // Get shows data
95        if (window.multiShowData && window.multiShowData[locationKey]) {
96            openMultiShowPanel(locationKey, window.multiShowData[locationKey]);
97        }
98    });
99    
100    // Close panel button
101    $(document).on('click', '.panel-close-btn', function(e) {
102        e.preventDefault();
103        closeMultiShowPanel();
104    });
105    
106    // Function to open the multi-show panel
107    function openMultiShowPanel(locationKey, shows) {
108        var $wrapper = $('#multi-show-panel-wrapper');
109        var $panel = $('#multi-show-panel');
110        
111        if (shows.length === 0) return;
112        
113        // Check if map is in fullscreen mode
114        var fullscreenElement = document.fullscreenElement || 
115                                document.webkitFullscreenElement || 
116                                document.mozFullScreenElement || 
117                                document.msFullscreenElement;
118        
119        // If in fullscreen, move panel wrapper to fullscreen container
120        if (fullscreenElement) {
121            if ($wrapper.parent()[0] !== fullscreenElement) {
122                $wrapper.detach().appendTo(fullscreenElement);
123            }
124        } else {
125            // If not in fullscreen, ensure it's back in map-wrapper
126            var $mapWrapper = $('.map-wrapper');
127            if ($wrapper.parent()[0] !== $mapWrapper[0]) {
128                $wrapper.detach().appendTo($mapWrapper);
129            }
130        }
131        
132        // Set the city name
133        var cityState = shows[0].city + ', ' + shows[0].state;
134        $panel.find('.panel-city').text(cityState);
135        
136        // Build show items
137        var showsHtml = '';
138        shows.forEach(function(show) {
139            // Use pre-formatted date/time from PHP (respects WordPress timezone)
140            var dateStr = show.formatted_date + ' • ' + show.formatted_time;
141            
142            showsHtml += '<div class="panel-show-item">';
143            showsHtml += '  <div class="panel-show-info">';
144            showsHtml += '    <div class="panel-show-date">' + dateStr + '</div>';
145            showsHtml += '    <div class="panel-show-city">' + show.city + ', ' + show.state + '</div>';
146            showsHtml += '    <div class="panel-show-venue">' + show.venue + '</div>';
147            showsHtml += '  </div>';
148            showsHtml += '  <a href="' + show.ticket_url + '" class="panel-learn-more-btn">Learn more</a>';
149            showsHtml += '</div>';
150        });
151        
152        $panel.find('.multi-show-panel-body').html(showsHtml);
153        
154        // Show wrapper (which contains the panel)
155        $wrapper.fadeIn(300);
156    }
157    
158    // Function to close the multi-show panel
159    function closeMultiShowPanel() {
160        $('#multi-show-panel-wrapper').fadeOut(300, function() {
161            $('#multi-show-panel .multi-show-panel-body').empty();
162        });
163    }
164    
165    // Helper function to format date
166    function formatShowDate(date) {
167        var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
168        var month = months[date.getMonth()];
169        var day = date.getDate();
170        var year = date.getFullYear();
171        var hours = date.getHours();
172        var minutes = date.getMinutes();
173        var ampm = hours >= 12 ? 'PM' : 'AM';
174        
175        hours = hours % 12;
176        hours = hours ? hours : 12; // the hour '0' should be '12'
177        minutes = minutes < 10 ? '0' + minutes : minutes;
178        
179        var timeStr = hours + (minutes !== '00' ? ':' + minutes : '') + ampm;
180        
181        return month + ' ' + day + ', ' + year + ' • ' + timeStr;
182    }
183    
184});

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.