PageSourceSearch

https://digital-watchdog.com/js/custom-script.js?20260924153114

js digital-watchdog.com collected 2026-09-24 22:31:37 UTC 6,698 bytes, 219 lines download raw bytes

1$(function() {
2    'use strict';
3
4    $('.datepicker').datepicker();
5
6    if ($('.banner-01').length) {
7        $('.banner-01').each(function() {
8            let self = $(this);
9            self.find('.slides').slick({
10                infinite: true,
11                slidesToShow: 1,
12                slidesToScroll: 1,
13                arrows: false,
14                dots: true,
15                appendDots: self.find('.dots'),
16                autoplay: true,
17                autoplaySpeed: 6000,
18                speed: 800,
19                pauseOnFocus: false,
20                pauseOnHover: false
21            });
22        });
23    }
24
25});
26
27
28$(document).ready(function(e) {
29    // Phone validation
30    $('input[type="tel"]').usPhoneFormat({
31        format: '(xxx) xxx-xxxx',
32    });
33
34    $('.validation_form').on('keyup keypress', function(e) {
35        var keyCode = e.keyCode || e.which;
36        if (keyCode === 13) {
37            e.preventDefault();
38            return false;
39        }
40    });
41    $('#gridFilterBtn').click(function(e) {
42        e.preventDefault();
43        $('[name=gridPage]').val('');
44        loadGridData();
45    });
46    $('[name=gridFilterKeySearch]').keydown(function(e) {
47        if (e.keyCode === 13) {
48            e.preventDefault();
49            $('[name=gridPage]').val('');
50            loadGridData();
51        }
52    });
53
54    // Toggle Container
55    if ($('.toggle-container').length) {
56        $('.toggle-container').each(function() {
57            let self = $(this),
58                tabs = self.find('.toggle-title'),
59                contents = self.find('.toggle-content');
60            tabs.click(function(e) {
61                e.preventDefault();
62                $(this).toggleClass('active');
63                $(this).next().slideToggle();
64            });
65        });
66    }
67
68
69    // START: PP Tab 01
70    if ($('.pp_tab_01').length) {
71        $('.pp_tab_01').each(function() {
72            let self = $(this),
73                tabs = self.find('.tab'),
74                tabContainers = self.find('.tab-container');
75            tabs.click(function(e) {
76                e.preventDefault();
77                tabs.removeClass('active');
78                $(this).addClass('active');
79                tabContainers.removeClass('active');
80                tabContainers.filter('[data-tab-id="' + $(this).attr('data-tab-id') + '"]').addClass('active');
81            });
82        });
83    }
84
85    $('[data-toggle="tooltip"]').tooltip();
86
87    $(".btn.bg-primary, input[type='submit']").on({
88        click: function() {
89            $(this).css("background-color", "#000");
90            $(this).css("color", "#ffffff");
91            $(this).css("font-weight", "600");
92        }
93    });
94
95    $('nav.navigation_22').addClass('dw-top-nav-sticky'); // Default
96
97    //btn-back-to-top
98
99    $('#btn-back-to-top').click(function(e) {
100        $('html, body').animate({ scrollTop: 0 }, 1000);
101    })
102
103
104    // Search Popup
105    var searchPopup = $('#topnav-search-container'),
106        searchPopupBox = searchPopup.find('.content-wrapper');
107    if (searchPopup.length) {
108        $('nav').find('.search-btn').click(function(e) {
109			$('nav.fixed-top,nav.dw-nav-tab-sticky1').addClass('zIndexClass');
110            e.preventDefault();
111            if (searchPopup.hasClass('active')) {
112				$('nav.fixed-top,nav.dw-nav-tab-sticky1').removeClass('zIndexClass');
113                searchPopup.removeClass('active');
114                if (searchPopupBox.length) searchPopupBox.slideUp();
115            } else {
116                searchPopup.addClass('active');
117				$('#top-keywords').focus();
118                /*if (searchPopupBox.length) {
119                    searchPopupBox.slideDown();
120                    //searchPopupBox.find('[name="keywords"]').eq(0).focus();
121					//$('#top-keywords').focus();
122                }*/
123            }
124        });
125        searchPopup.find('.close-btn, .popup-close').click(function(e) {
126			$('nav.fixed-top,nav.dw-nav-tab-sticky1').removeClass('zIndexClass');
127            e.preventDefault();
128            searchPopup.removeClass('active');
129            if (searchPopupBox.length) searchPopupBox.slideUp();
130        });
131    }
132
133    //Tag Logic	
134    $('input[data-role="tagsinput"]').tagsinput({
135        maxTags: 20,
136        maxChars: 25,
137        trimValue: true,
138        allowDuplicates: false
139    });
140
141    // Mobile Top Nav menus Container
142    if ($('.nav-menus').length) {
143        $('.nav-menus').each(function() {
144            let self = $(this),
145                tabs = self.find('span'),
146                contents = self.find('.nav-menu');
147            tabs.click(function(e) {
148                e.preventDefault();
149                $(this).toggleClass('active');
150                $(this).next().slideToggle();
151            });
152        });
153    }
154
155    // Mobile Top Nav menus Container
156    if ($('.nav-menus.nav-menu').length) {
157        $('.nav-menus.nav-menu').each(function() {
158            let self = $(this),
159                tabs = self.find('span'),
160                contents = self.find('.nav-menu-drop');
161            tabs.click(function(e) {
162                e.preventDefault();
163                $(this).toggleClass('active');
164                $(this).next().slideToggle();
165            });
166        });
167    }
168	
169	//allow_only_price
170	$('input.allow_only_price').on('input', function() {
171	  this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*?)\..*/g, '$1');
172	});
173	
174	//allow_only_number
175	$('input.allow_only_number').on('input', function() {
176	  var self = $(this);
177		self.val(self.val().replace(/\D/g, ""));
178		if ((evt.which < 48 || evt.which > 57)) 
179		 {
180		   evt.preventDefault();
181		 }
182	});
183	
184});
185
186$(document).on('click', '[data-toggle="pill"]', function(e) {
187    e.stopPropagation();
188    $(this).tab('show');
189});
190
191$(window).scroll(function(e) {
192
193    if ($(this).scrollTop() > 0) {
194        $('nav.navigation_22').addClass('dw-top-nav-fixed');
195        $('nav.navigation_22').removeClass('dw-top-nav-sticky');
196    } else {
197        $('nav.navigation_22').removeClass('dw-top-nav-fixed');
198        $('nav.navigation_22').addClass('dw-top-nav-sticky');
199    }
200
201
202    if ($(this).scrollTop() > 20) {
203
204        $('#btn-back-to-top').removeClass('d-none');
205    } else {
206        $('#btn-back-to-top').addClass('d-none');
207
208    }
209});
210
211$(document).ready(function() {
212	//QB-CartItemsFancybox Close Login
213	$('.QB-CartItemsFancybox').fancybox({
214		type: 'iframe',
215		afterClose: function () { // USE THIS IT IS YOUR ANSWER THE KEY WORD IS "afterClose"
216			parent.location.reload(true);
217		}
218	});	
219});	

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.