PageSourceSearch

https://www.goodtimes.sc/wp-content/plugins/forms-contact/js/front.js?ver=6.9

js goodtimes.sc collected 2026-09-24 09:05:33 UTC 10,747 bytes, 306 lines download raw bytes

1jQuery(document).ready(function () {
2
3    jQuery(".hugeit-contact-column-block select").on('change keyup', function () {
4        jQuery(this).prev('.textholder').val(jQuery(this).find('option:selected').text());
5    });
6
7    /*Pagination*/
8    var x = (jQuery(document).find(".hugeit-form-pagination").length>1)? true : false;
9    if(x){
10    var parentPag = jQuery(document).find(".hugeit-form-pagination").parent();
11    var defValue=1,numPages= parentPag.children(".hugeit-form-pagination").length,pages=parentPag.children(".hugeit-form-pagination"),title=parentPag.children('h3'), current = 1;
12
13    function init(){
14        parentPag.html(jQuery(pages.hide()));
15        jQuery(pages).eq(0).show();
16        jQuery(pages).eq(0).before(title);
17        jQuery("#prev").css("visibility","hidden");
18        jQuery(".paginationUl").show();
19    }
20
21    function createPagination(){
22        for(var i=1;i<=numPages;i++){
23            var li = "<li value='"+i+"' class='item'> "+i+"</li>";
24            jQuery("#next").before(li);
25
26            if(i==1) {
27                jQuery(".paginationUl li.item").addClass("pagCurrent");
28            }
29        }
30    }
31
32    function validation(val) {
33        return val <= 0 || val > numPages ? false : true;
34    }
35
36    function setCurrent(val){
37        jQuery(pages).hide();
38        jQuery(".paginationUl li").removeClass('pagCurrent');
39        current=val;
40        if(current!=1){
41            jQuery("#prev").css("visibility","visible");
42        }
43        else {
44            jQuery("#prev").css("visibility","hidden");
45        }
46        if(current!=numPages){
47            jQuery("#next").css("visibility","visible");
48        }
49        else {
50            jQuery("#next").css("visibility","hidden");
51        }
52
53        jQuery(".paginationUl li[value='"+current+"']").addClass("pagCurrent");
54        var counter = current;
55        var currentDiv = jQuery(pages.get(--counter));
56        currentDiv.fadeIn("slow");
57    }
58    init();
59    createPagination();
60
61    jQuery(document).on("click",".paginationUl li.item",function () {
62        var currentValue = this.value;
63        validation(currentValue);
64        setCurrent(currentValue);
65    });
66
67    jQuery(document).on("click","#prev,#next",function () {
68        var copyCurrent = current;
69        var currentValue = (this.id=="next")?++copyCurrent:--copyCurrent;
70        if(validation(currentValue)){
71            setCurrent(currentValue);
72        }
73
74    });
75}
76    /*Pagination*/
77
78
79    /*
80    Conditional Logic
81    */
82    var hg_arr__ = [];
83    /*
84    *
85    * hg_ClearUp_ function clear blocks with
86    * cond-logic, which is hidden
87    *
88    * */
89    function hg_ClearUp_(arr) {
90        for(var e in arr){ if(arr[e].css("display")=="none") arr[e].remove(); }
91    }
92    function ChangeEvent(element) {
93
94        hg_arr__.push(element);
95        element.css("display","none");
96        var dep_field = element.data("hg_cl_data_front").hg_dep_field;
97        var dep_field_val = element.data("hg_cl_data_front").hg_dep_field_val;
98        dep_field = (dep_field.match("selectbox")!=null)?"select:has(option:contains('"+dep_field_val+"'))":dep_field;
99        dep_field = (dep_field.match("checkbox")!=null)?"input[type='checkbox'][value='"+dep_field_val+"']":dep_field;
100        dep_field = (dep_field.match("radio")!=null)?"input[type='radio'][value='"+dep_field_val+"']":dep_field;
101        /*Radio buttons are separated*/
102        if( dep_field.match("radio") ) {
103            jQuery(".hugeit-contact-form-container").find(".hugeit-radiobox-list:has(input[type='radio'][value='"+dep_field_val+"'])").children("div li").on("click",function (e) {
104
105                if(jQuery(".hugeit-contact-form-container").find(dep_field).length > 1 && e.originalEvent !== undefined){
106                    var _DepFieldLengthRad = jQuery(".hugeit-contact-form-container").find(dep_field).length;
107                    jQuery(".hugeit-contact-form-container").find(dep_field).each(function(i){
108
109                        if(!jQuery(".hugeit-contact-form-container "+dep_field).is(":checked")){
110                            _DepFieldLengthRad--;
111                        }
112
113                    });
114
115                    if(_DepFieldLengthRad){
116                        element.show("slow");
117                    }
118                    else {
119                        element.hide("slow");
120                    }
121
122                    return;
123
124                }
125
126                if(jQuery(".hugeit-contact-form-container "+dep_field).is(":checked")){
127                    element.show("slow");
128                }
129                else {
130                    element.hide("slow");
131                }
132
133            });
134            jQuery(".hugeit-contact-form-container").find(".hugeit-radiobox-list:has(input[type='radio'][value='"+dep_field_val+"'])").children("div li").trigger("click");
135            return;
136        }
137        /*Radio buttons are separated*/
138        jQuery(".hugeit-contact-form-container "+dep_field).on("change",function (e) {
139
140            if(dep_field.match("select") ) {
141
142                if(jQuery(".hugeit-contact-form-container").find(dep_field).length > 1 && e.originalEvent !== undefined){
143                    var _DepFieldLength = jQuery(".hugeit-contact-form-container").find(dep_field).length;
144                    jQuery(".hugeit-contact-form-container").find(dep_field).each(function(i){
145
146                        if(jQuery(this).val() != dep_field_val){
147                            _DepFieldLength--;
148                        }
149
150                    });
151
152                    if(_DepFieldLength){
153                        element.show("slow");
154                    }
155                    else {
156                        element.hide("slow");
157                    }
158
159                return;
160                }
161
162                if(jQuery(this).val()==dep_field_val){
163                    element.show("slow");
164                }
165
166                else {
167                    element.hide("slow");
168                }
169
170                return;
171            }
172
173            if(dep_field.match("checkbox")){
174                if(jQuery(".hugeit-contact-form-container").find(dep_field).length > 1 && e.originalEvent !== undefined){
175                    var _DepFieldLengthCheck = jQuery(".hugeit-contact-form-container").find(dep_field).length;
176                    jQuery(".hugeit-contact-form-container").find(dep_field).each(function(i){
177
178                        if(!jQuery(this).is(":checked")){
179                            _DepFieldLengthCheck--;
180                        }
181
182                    });
183
184                    if(_DepFieldLengthCheck){
185                        element.show("slow");
186                    }
187                    else {
188                        element.hide("slow");
189                    }
190
191                    return;
192
193                }
194
195                if( jQuery(this).is(":checked") ){
196                    element.show("slow");
197                }
198                else element.hide("slow");
199            }
200
201        });
202
203        jQuery(".hugeit-contact-form-container "+dep_field).trigger("change");
204
205
206    }
207
208    jQuery(".hugeit-contact-form-container").find("[data-hg_cl_data_front]").each(function () {
209    if(jQuery(this).data("hg_cl_data_front") != "") {
210        ChangeEvent(jQuery(this));
211    }
212    });
213    window.hg_ClearUp_ = hg_ClearUp_;
214    window.hg_arr__   = hg_arr__;
215    /*
216    Conditional Logic
217    */
218
219    /* Mask On */
220    jQuery(".hugeit-contact-form-container").find("[data-hg-pattern]").each(function () {
221        var hg_pattern = jQuery(this).data('hg-pattern');
222        hg_pattern = hg_pattern.toString();
223        jQuery(this).mask(hg_pattern);
224    });
225    /* Mask On */
226
227    function hugeitFormsResize(){
228        var forms = jQuery('.hugeit-contact-wrapper .multicolumn');
229
230        forms.each(function () {
231            if( jQuery(this).width() < 521 ){
232                jQuery(this).find('.hugeit-contact-column-block').addClass('fullWidth')
233            } else {
234                jQuery(this).find('.hugeit-contact-column-block').removeClass('fullWidth')
235            }
236        })
237    }
238
239    function reOrganizeFields(){
240
241        var forms = jQuery('.hugeit-contact-wrapper');
242
243        if( jQuery(window).width()<768 ){
244            forms.each(function () {
245                var form = jQuery(this);
246                if(!form.children('.hugeit-form-mobile').length){
247                    form.append('<div class="hugeit-form-mobile"></div>');
248
249                    var movingLicenseBlocks = form.find('.hugeit-field-block.license-block');
250                    var movingCaptchaBlocks = form.find('.hugeit-field-block.captcha-block,.hugeit-field-block.simple-captcha-block');
251                    var movingButtonsBlocks = form.find('.hugeit-field-block.buttons-block');
252
253                    movingLicenseBlocks.each(function () {
254                        var rel = jQuery(this).attr('rel');
255                        jQuery('<span data-placeholder="'+rel+'"></span>').insertBefore(this);
256                        jQuery(this).appendTo(form.find('.hugeit-form-mobile'));
257                    })
258
259                    movingCaptchaBlocks.each(function () {
260                        var rel = jQuery(this).attr('rel');
261                        jQuery('<span data-placeholder="'+rel+'"></span>').insertBefore(this);
262                        jQuery(this).appendTo(form.find('.hugeit-form-mobile'));
263                    })
264
265                    movingButtonsBlocks.each(function () {
266                        var rel = jQuery(this).attr('rel');
267                        jQuery('<span data-placeholder="'+rel+'"></span>').insertBefore(this);
268                        jQuery(this).appendTo(form.find('.hugeit-form-mobile'));
269                    })
270
271                }
272            })
273
274        } else {
275            forms.each(function () {
276                var form = jQuery(this);
277                if(form.children('.hugeit-form-mobile').length){
278                    var movedBlocks = form.find('.hugeit-form-mobile').find('.hugeit-field-block.license-block,.hugeit-field-block.captcha-block,.hugeit-field-block.simple-captcha-block,.hugeit-field-block.buttons-block');
279
280                    movedBlocks.each(function () {
281                        var rel = jQuery(this).attr('rel');
282                        jQuery(this).insertBefore(jQuery('span[data-placeholder="'+rel+'"]'));
283                        jQuery('span[data-placeholder="'+rel+'"]').remove();
284                    })
285
286                    form.find('.hugeit-form-mobile').remove();
287                }
288            })
289        }
290    }
291
292    hugeitFormsResize();
293    reOrganizeFields();
294
295
296    /* window resize */
297    jQuery(window).on('resize',function () {
298        hugeitFormsResize();
299        reOrganizeFields();
300
301    })
302    /* end window resize */
303
304
305});
306

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.