PageSourceSearch

https://woodstocksiv.com/pattern-lab/public/js/main.js?

js woodstocksiv.com collected 2026-09-30 11:42:58 UTC 7,103 bytes, 215 lines download raw bytes

1/* Main JS init go here */
2jQuery(document).ready(function($) {
3
4
5    //input other checked
6    $("#input_9_4_other").focus(function() {
7        $('#choice_4_0').removeAttr("checked");
8        $('#choice_4_1').removeAttr("checked");
9        $('#choice_4_2').prop("checked", true);
10    });
11    $("#choice_4_2").click(function() {
12        $('#input_9_4_other').focus();
13    });
14
15    jQuery(document).bind('gform_post_render', function(event, formId, current_page) {
16        jQuery('<label id="label_4_2" for="choice_4_2"></label>').insertAfter('#choice_4_2');
17        $("#input_9_4_other").focus(function() {
18            $('#choice_4_0').removeAttr("checked");
19            $('#choice_4_1').removeAttr("checked");
20            $('#choice_4_2').prop("checked", true);
21        });
22    });
23    //class and id  for order online button.
24    $(".menu-order-online a").addClass("order-online");
25    $('.menu-order-online a').attr('id', 'order-footer');
26    //class and id  for order online button end.
27    //
28    //Gravity Form Scroll to Confirmation Message
29    jQuery(document).bind('gform_confirmation_loaded', function(event, form_id) {
30        jQuery(window).scrollTop(jQuery('#gform_confirmation_wrapper_' + form_id).offset().top - 310);
31    });
32
33    $('.curved').arctext({radius: 300});
34    /* Mobile Toggle Menu Start */
35    $(window).on('resize', function(){
36        if($(window).width() > 910){
37            $('.primary-nav-wrap').css('left', '0');
38            $('.header').css('left', '0');
39        }
40        else {
41            $('.primary-nav-wrap').css('left', '-250px');
42            $('.content-wrap').css('left', '0');
43        }
44    });
45
46    $('.mobile-nav-trigger').on('click', function() {
47        if(window.matchMedia('(max-width: 910px)').matches){
48            $('.primary-nav-wrap').toggleClass('active');
49            $('.content-wrap').toggleClass('active');
50            $('.header').toggleClass('active');
51
52            if (!$(".header").hasClass("active")) {
53                $('.header').css('left', '0');
54            } else {
55                $('.header').css('left', '240px');
56            }
57
58            if ($(".primary-nav-wrap").hasClass("active")) {
59                $('.primary-nav-wrap').css('left', '0');
60            } else {
61                $('.primary-nav-wrap').css('left', '-250px');
62            }
63        }
64    });
65
66    if(window.matchMedia('(max-width: 910px)').matches){
67        $('ul.dropdown-menu li a').click(function() {
68            if (!$(".header").hasClass("active")) {
69                $('.header').css('left', '0');
70            } else {
71                $('.header').css('left', '240px');
72            }
73            if ($(this).parents().eq(2).hasClass('active')) {
74                $('.primary-nav-wrap').css('left', '-250px');
75            }
76        });
77    }
78    /* Mobile Toggle Menu End */
79    
80    if(!$('body').hasClass('page-id-1683')){
81    if(!$('body').hasClass('page-id-2416')){
82    if(!$('body').hasClass('page-id-2416')){
83    if(!$('body').hasClass('page-id-2459')){
84	    $(document).on('scroll', function() {
85	        var body = $('body');
86	        var scrollPos = $(document).scrollTop();
87	        var header = $('.header');
88	
89	
90	        if (scrollPos > 271) {
91	            header.addClass('mini');
92	            body.addClass('mini');
93	        } else {
94	            header.removeClass('mini');
95	            body.removeClass('mini');
96	        }
97	    });
98    }
99    }
100    }
101    }
102
103    $('.datepicker input').pickadate();
104    $('.timepicker input').pickatime();
105    $('select').chosen();
106
107    // reloads the form functions on submit / fail / reload
108    $(document).on('gform_page_loaded', function(evt) {
109        $('.datepicker input').pickadate();
110        $('.timepicker input').pickatime();
111        $('select').chosen();
112    });
113
114    $('.dropdown-menu').onePageNav({
115        currentClass: 'current',
116        changeHash: false,
117        scrollSpeed: 1000,
118        'scrollOffset': 500,
119        scrollThreshold: 0.5,
120        filter: '',
121        easing: 'swing',
122        begin: function() {
123            //I get fired when the animation is starting
124        },
125        end: function() {
126            //I get fired when the animation is ending
127        },
128        scrollChange: function($currentListItem) {
129            //I get fired when you enter a section and I pass the list item of the section
130        }
131    });
132    if(window.matchMedia('(max-width: 910px)').matches){
133        $('.dropdown-menu a').on('click', function() {
134            $('.primary-nav-wrap').toggleClass('active');
135            $('.content-wrap').toggleClass('active');
136            $('.header').toggleClass('active');
137            if (!$(".header").hasClass("active")) {
138                $('.header').css('left', '0');
139            } else {
140                $('.header').css('left', '240px');
141            }
142        });
143    }
144
145    $('#sg_NextButton').val('Next');
146    //insert label for donation form
147    $('<label id="label_4_2" for="choice_4_2"></label>').insertAfter('#choice_4_2');
148
149    /* Sub-Menu Arrow Start */
150    $(".caret, .caretClose").click(function(event) {
151        event.preventDefault();
152        var parent = $(this).parent().parent();
153        $('.dropdown-menu').not(parent.children(".dropdown-menu").toggle()).hide();
154        if ($(this).hasClass("caret")) {
155            $("li.dropdown a b").attr("class", "caret");
156            $(this).attr("class", "caretClose");
157        } else {
158            $("li.dropdown a b").attr("class", "caret");
159            if (!parent.hasClass("active")) {
160                $(this).attr("class", "caret");
161            } else {
162                $(this).css("border-left", "6px solid #fff");/* Change Caret On Active */
163            }
164        }
165    });
166    if ($("li.active b").hasClass("caret")) {
167        $("li.active b").attr("class", "caretClose");
168    }
169    /* Sub-Menu Arrow End */
170
171
172    if(window.matchMedia('(max-width: 910px)').matches){
173        $("li.dropdown").each(function(index) {
174            if (!$(this).hasClass("active")) {
175                var menuHref = $(this).find('a').attr("href");
176                $(this).find('ul li').each(function(i) {
177                    var subHref = $(this).find('a').attr("href");
178                    var newUrl = menuHref + subHref;
179                    $(this).find('a').attr("href", newUrl);
180                });
181            }
182        });
183    }
184
185
186   /* Google Analytics tracking for "Order Online" clicks */
187    $('.order-online').click(function() {
188        ga('send', 'event', 'Order Online', 'Click', $(this).attr('id'));
189    });
190
191});
192var hash = window.location.hash;
193$(window).load(function() {
194    //alert(hash);
195    if (hash == '#tap-modal') {
196        $(hash).modal('show');
197    }
198});
199
200$(".tap-right a").click(function() {
201    if (hash == '#tap-modal') {
202        $(hash).modal('show');
203    }
204
205
206});
207
208//code to update dateformat in customer survey form in mobiles
209/*jQuery(document).on( "blur", "#sgE-1828500-1-19-element", function() {
210 if(screenWidth < 640){
211 var dateValueSplit = ($(this).val()).split('-');
212 var date = dateValueSplit[1]+'/'+dateValueSplit[2]+'/'+dateValueSplit[0];
213 $(this).text(date);
214 }
215 });*/

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.