PageSourceSearch

https://luxelectricalwiltshire.co.uk/wp-content/themes/luxelectric…/js/custom-script.js?cache=1791391008

js luxelectricalwiltshire.co.uk collected 2026-10-07 16:37:12 UTC 3,455 bytes, 120 lines download raw bytes

1// menu
2$(function(){
3	$('.header .togglebar').click(function(){
4		$(this).addClass('active');
5		$('.header nav').addClass('active');
6		$('body').addClass('header_style');
7	})
8	
9	$('.header .close').click(function(){
10		$(this).addClass('active');
11		$('.header .togglebar').removeClass('active');
12		$('.header nav').removeClass('active');
13		$('body').removeClass('header_style');
14	})
15})
16
17//hide header scroll
18$(document).ready(function () {
19    'use strict';
20
21    var lastScrollTop = 0,
22        navbar = $('header'),
23        navbarHeight = navbar.outerHeight();
24
25    // Set body padding based on header height
26    $('body').css('padding-top', navbarHeight + 'px');
27
28    $(window).scroll(function () {
29        var currentScrollTop = $(this).scrollTop();
30
31        if (currentScrollTop > lastScrollTop) {
32            // Scrolling down
33            if (currentScrollTop > navbarHeight) {
34                navbar.addClass("scrollUp").removeClass('fixed');
35            }
36        } else {
37            // Scrolling up
38            navbar.removeClass("scrollUp");
39            if (currentScrollTop > navbarHeight) {
40                navbar.addClass('fixed');
41            } else {
42                navbar.removeClass('fixed'); // Remove fixed class when at the top
43            }
44        }
45
46        lastScrollTop = currentScrollTop;
47    });
48});
49
50
51$(function(){
52	$('.header').find('.dropsub-menu').append("<span class='down_arrow'><i class='fa-regular fa-angle-down'></i>		</span>")
53     })
54
55 $(document).on("click","nav ul li .down_arrow",function() {
56      $(this).prev().slideToggle();
57  });
58
59  $(document).on("click","nav ul li .arrow",function() {
60      $(this).prev().slideToggle();
61  });
62
63/////////////////// SLIDER JS /////////////////
64  $('.banner-slider').slick({
65    dots: true,
66    arrows:false,
67    autoplay: true,
68    infinite: true,
69    speed: 1200,
70    slidesToShow: 1,
71    slidesToScroll: 1,
72  })
73
74////////////// load more /////////////////
75
76//logo slider
77$('.brandlogo-slider').slick({
78	dots: false,infinite: true,autoplay: true, arrows: false, speed: 1000,slidesToShow: 5,slidesToScroll: 1,
79	responsive: [{breakpoint: 1200, settings: {slidesToShow: 3,slidesToScroll: 1}},
80				 {breakpoint: 600,settings: {slidesToShow: 2,slidesToScroll: 1}},
81				 {breakpoint: 480, settings: {slidesToShow: 1, slidesToScroll: 1}}]
82});
83
84//Gallery Slider
85$('.gallery-slider').slick({dots: false,infinite: true,autoplay: true, arrows: true, speed: 1000,slidesToShow: 3,slidesToScroll: 1,centerMode: true,
86		responsive: [{breakpoint: 1024, settings: {slidesToShow: 3,slidesToScroll: 1}},
87				{breakpoint: 991,settings: {slidesToShow: 2,slidesToScroll: 1}},
88				{breakpoint: 767,settings: {slidesToShow: 2,slidesToScroll: 1}},
89				{breakpoint: 420,settings: {slidesToShow: 1,slidesToScroll: 1}}]
90	});
91
92//review slider
93$('.testimonial-slider').slick({
94    dots: false,
95    arrows:false,
96    autoplay: true,
97    infinite: true,
98    speed: 1200,
99    slidesToShow: 1,
100    slidesToScroll: 1,
101})
102
103// contact
104$('.button_feild input[type="submit"]').attr('disabled','disabled');
105$(function() {	
106    $('#acceptance').click(function() {
107        if ($(this).is(':checked')) {
108            $('.button_feild input[type="submit"]').removeAttr('disabled');
109        } else {
110            $('.button_feild input[type="submit"]').attr('disabled', 'disabled');
111        }
112    });
113});
114
115//AOS Animation
116document.addEventListener('DOMContentLoaded', function () {
117	AOS.init({
118    	once: true
119  	});
120});

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.