PageSourceSearch

https://videoray.com/wp-content/themes/hello-theme-child-master/js/custom.js?ver=1790091313

js videoray.com collected 2026-09-25 20:29:22 UTC 11,443 bytes, 337 lines download raw bytes

1jQuery(document).ready(function($) {
2
3	$("#search_top").click(function(){
4		$(".search_contain").toggleClass("active");
5	});
6
7	$(".search_btn, .search_close").click(function(){
8		$(".search_contain").removeClass("active");
9	});
10
11	$(document).on("scroll", function(){
12		if ($(document).scrollTop() > 80){
13			$(".header").addClass("shrink");
14		} else {
15			$(".header").removeClass("shrink");
16		}
17	});
18	
19    jQuery('.helpSec .tabs-left a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
20        var target = jQuery(e.target).data("bg");
21
22				// jQuery('#helpSec-bg').fadeTo('slow', 0.3, function() {
23				// 	jQuery(this).css('background-image','url('+target+')');
24				// }).delay(1000).fadeTo('slow', 1);
25		
26		
27  		var image = jQuery('#helpSec-bg');
28  		// image.css('background-image','url('+target+')');
29
30  		image.fadeOut(500, function () {
31  			image.css('background-image','url('+target+')');
32  			image.fadeIn(500);
33  		});		
34      jQuery('.treatment-slider-ba').resize();
35		
36    });
37
38	//if (jQuery("body").hasClass('page-id-893')) {
39		jQuery( window ).scroll(function() {
40			if (jQuery('#sticky_product_nav .elementor-sticky').hasClass('elementor-sticky--active')) {
41				//jQuery('.one_page_navigation li.request_a_quote').hide();
42				jQuery('.one_page_navigation_container').addClass('changed');
43				console.log('class added');
44			} else {
45				//jQuery('.one_page_navigation li.request_a_quote').show();
46				jQuery('.one_page_navigation_container').removeClass('changed');
47				console.log('class removed');
48			}
49		});
50	//}
51
52	var headerHeight = jQuery('.header').innerHeight();
53	jQuery('body').css('padding-top', headerHeight+'px');
54
55
56
57    $('.industry_slider').slick({
58        dots: true,
59        infinite: false,
60        speed: 300,
61        arrows: true,
62        centerMode: false,
63        slidesToShow: 4,
64        slidesToScroll: 1,
65        responsive: [
66          {
67            breakpoint: 595,
68            settings: {
69              centerPadding: '2px',
70              centerMode: false,
71              slidesToShow: 1
72            }
73          },
74          {
75            breakpoint: 361,
76            settings: {
77              centerPadding: '20px',
78              centerMode: false,
79              slidesToShow: 1
80            }
81          }
82        ]
83    }).on("setPosition", function () {
84      resizeSlider();
85    });
86
87	var slickHeight = $(".slick-track").outerHeight();
88	var slideHeight = $(".slick-track").find(".slick-slide").outerHeight();
89
90	function resizeSlider() {
91		$(".slick-track")
92	  .find(".slick-slide .slide-wrap")
93	  .css("height", slickHeight + "px");
94	}
95
96
97    $('.home_news_slider').slick({
98        dots: true,
99        infinite: false,
100        speed: 300,
101        arrows: true,
102        centerMode: false,
103        slidesToShow: 4,
104        slidesToScroll: 1,
105        responsive: [
106          {
107            breakpoint: 595,
108            settings: {
109              centerPadding: '80px',
110              centerMode: true,
111              slidesToShow: 1
112            }
113          },
114          {
115            breakpoint: 361,
116            settings: {
117              centerPadding: '20px',
118              centerMode: true,
119              slidesToShow: 1
120            }
121          }
122        ]
123    }).on("setPosition", function () {
124      resizeHomeSlider();
125    });
126
127
128		var slickHomeHeight = $(".home_news_slider>.slick-track").outerHeight();
129		var slideHomeHeight = $(".home_news_slider>.slick-track").find(".slick-slide").outerHeight();
130
131		function resizeHomeSlider() {
132		$(".home_news_slider>.slick-track")
133		  .find(".slick-slide .slide-wrap")
134		  .css("height", slickHomeHeight + "px");
135		}
136
137
138	$('.virtual_insights_subscription').click(function() {
139
140		var redierctURL = $(this).data('redirect');
141
142		$('#input_11_3').val(redierctURL);
143	});
144
145
146  // Product with filter JS
147
148	jQuery(document).on('click', '.filter-product-grid .product-single-title', function() {
149  // jQuery('.filter-product-grid .product-single-title').on('click', function(){
150  	console.log('www');
151    jQuery(this).parent('.product-single-thumb-box').siblings('.product-single-content-box').toggle();
152    jQuery(this).toggleClass('active');
153  });
154
155
156    jQuery('#blog_category').on('change', function() {
157      var selected = jQuery(this).val();
158
159      if (selected != -1) {
160        location.href = "https://videoray.com/blog_categories/"+selected+"/";
161      }
162    });
163});
164
165
166
167jQuery(document).ready(function($) {
168    // Make sure headingsFromACF is defined from the PHP output
169    if (typeof headingsFromACF !== 'undefined' && headingsFromACF.length > 0) {
170        // Select all h2 tags within the .post-with-outline > .elementor-widget-container section
171        var headings = $('.post-with-outline > .elementor-widget-container h2');
172
173        // Loop through each heading and match with the ACF-generated TOC
174        headings.each(function(index) {
175            var heading = $(this);
176            var headingText = heading.text().trim();
177            var headingSlug = headingText.toLowerCase().replace(/\s+/g, '-'); // Slugify heading text
178
179            // Only add ID to headings that are in the ACF list
180            if ($.inArray(headingSlug, headingsFromACF.map(function(h) { return h.slug; })) !== -1) {
181                // Apply the matching ID to the heading
182                heading.attr('id', headingSlug);
183            }
184        });
185
186        // Remove any existing TOC before adding the new one
187        $('.outline-nav').remove();
188
189        // Append the outline navigation to the desired location (e.g., before the post)
190        $('.table-of-blog-contents').prepend('<nav class="outline-nav"><ul>' + headingsFromACF.map(function(item) {
191            return '<li><a href="#' + item.slug + '" style="background-color: transparent;">' + item.text + '</a></li>';
192        }).join('') + '</ul></nav>');
193
194        // Show the TOC wrapper
195        $('.table-of-blog-contents-wrapper').show();
196    }
197});
198
199
200
201
202
203
204
205jQuery(document).ready(function($) {
206  // Function to insert landscape ads and animate them
207  function insertLandscapeAds() {
208      // Perform an AJAX request to fetch landscape ads
209      $.ajax({
210          url: ajaxurl, // This is automatically provided by WordPress 
210in the admin
211          type: 'POST',
212          data: {
213              action: 'get_landscape_ads' // Action to trigger the PHP function
214          },
215          success: function(response) {
216              if (response) {
217                  let landscapeAds = $(response); // Wrap the response in jQuery object
218                  let adWrappers = $('.landscape-ad-wrapper .elementor-widget-wrap'); // Target all .elementor-widget-wrap inside .landscape-ad-wrapper
219
220                  // Loop through each ad wrapper and insert the ads
221                  adWrappers.each(function() {
222                      let adWrapper = $(this); // Current ad wrapper
223
224                      // Clone the landscape ads for this wrapper
225                      let adsClone = landscapeAds.clone();
226
227                      // Append cloned ads to the current ad wrapper
228                      adWrapper.append(adsClone);
229
230                      let ads = adWrapper.find('.landscape-ad'); // Get all ads in this wrapper
231
232                      // Hide all ads initially
233                      ads.hide();
234
235                      // Function to cycle through ads with a 7-second delay in each wrapper
236                      function cycleAds(index = 0) {
237                          // Hide all ads except the current one
238                          ads.hide();
239
240                          // Fade in the current ad
241                          $(ads.get(index)).fadeIn(1000).delay(7000).fadeOut(1000, function() {
242                              // Move to the next ad (or loop back to the start)
243                              let nextIndex = (index + 1) % ads.length;
244                              cycleAds(nextIndex); // Recursively call the function
245                          });
246                      }
247
248                      // Start cycling through ads in this wrapper
249                      if (ads.length > 0) {
250                          cycleAds(0); // Start with the first ad
251                      }
252                  });
253              }
254          },
255          error: function(error) {
256              console.log('Error fetching ads:', error);
257          }
258      });
259  }
260
261  // Call the function to insert landscape ads on page load
262  insertLandscapeAds();
263});
264
265
266jQuery(document).ready(function($) {
267  // Function to insert portrait ads and animate them
268  function insertPortraitAds() {
269      // Perform an AJAX request to fetch portrait ads
270      $.ajax({
271          url: ajaxurl, // This is automatically provided by WordPress in the admin
272          type: 'POST',
273          data: {
274              action: 'get_portrait_ads' // Action to trigger the PHP function for portrait ads
275          },
276          success: function(response) {
277              if (response) {
278                  let portraitAds = $(response); // Wrap the response in jQuery object
279                  let adWrappers = $('.portrait-ad-wrapper .elementor-widget-wrap'); // Target all .elementor-widget-wrap inside .portrait-ad-wrapper
280
281                  // Loop through each ad wrapper and insert the ads
282                  adWrappers.each(function() {
283                      let adWrapper = $(this); // Current ad wrapper
284
285                      // Clone the portrait ads for this wrapper
286                      let adsClone = portraitAds.clone();
287
288                      // Append cloned ads to the current ad wrapper
289                      adWrapper.append(adsClone);
290
291                      let ads = adWrapper.find('.portrait-ad'); // Get all ads in this wrapper
292
293                      // Hide all ads initially
294                      ads.hide();
295
296                      // Function to cycle through ads with a 7-second delay in each wrapper
297                      function cycleAds(index = 0) {
298                          // Hide all ads except the current one
299                          ads.hide();
300
301                          // Fade in the current ad
302                          $(ads.get(index)).fadeIn(1000).delay(7000).fadeOut(1000, function() {
303                              // Move to the next ad (or loop back to the start)
304                              let nextIndex = (index + 1) % ads.length;
305                              cycleAds(nextIndex); // Recursively call the function
306                          });
307                      }
308
309                      // Start cycling through ads in this wrapper
310                      if (ads.length > 0) {
311                          cycleAds(0); // Start with the first ad
312                      }
313                  });
314              }
315          },
316          error: function(error) {
317              console.log('Error fetching ads:', error);
318          }
319      });
320  }
321
322  // Call the function to insert portrait ads on page load
323  insertPortraitAds();
324});
325
326
327
328jQuery(document).ready(function($) {
329  // Add a div after the 3rd post
330  $('.posts-with-ad .elementor-posts-container .elementor-post:nth-child(3)').after('<div class="landscape-a
330d-wrapper"><div class="elementor-widget-wrap"></div></div>');
331  
332  // Add another div after the 6th post if there are enough posts
333  if ($('.posts-with-ad .elementor-posts-container .elementor-post').length >= 9) {
334      $('.posts-with-ad .elementor-posts-container .elementor-post:nth-child(9)').after('<div class="landscape-ad-wrapper"><div class="elementor-widget-wrap"></div></div>');
335  }
336});
337

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.