PageSourceSearch

https://corlet.fr/wp-content/themes/Corlet21/scripts.js?ver=1.0.0

js corlet.fr collected 2026-10-04 11:06:46 UTC 3,926 bytes, 123 lines download raw bytes

1var $ = jQuery.noConflict();
2
3$(document).ready(function () {
4	$('.accordeon').on('click', function () {
5		if ($(window).width() < 768)
6			$(this).find('p.content').slideToggle();
7	});
8
9	$(".navbar-toggler").on('click', function () {
10		$('header.container-fluid').toggleClass('expanded');
11	});
12
13	initAds();
14});
15
16$(document).ready(function () {
17    function addShowClass(element) {
18        $(element).addClass('show');
19        $(element).closest('.nav-item').addClass('show');
20        $(element).next('.dropdown-menu').addClass('show');
21    }
22
23    function removeShowClass(element) {
24        $(element).removeClass('show');
25        $(element).closest('.nav-item').removeClass('show');
26        $(element).next('.dropdown-menu').removeClass('show');
27    }
28
29    // Gestion du hover sur les nav-links et dropdown-menus
30    $('.menu-item-has-children .nav-link, .menu-item-has-children .dropdown-menu').hover(function () {
31        addShowClass($(this));
32    }, function () {
33        removeShowClass($(this));
34    });
35
36    // Gestion du clic sur les nav-links
37    $('.menu-item-has-children .nav-link').on('click', function (event) {
38        // Annuler tous les autres événements JS
39        event.preventDefault();
40
41        // Rediriger vers l'URL spécifiée dans le lien
42        var url = $(this).attr('href');
43        window.location.href = url;
44    });
45});
46
47
48function initAds() {
49	// Adwords on page view
50	//AW-10848296794/_lhRCJ-D1ZkDENq-77Qo
51	tarteaucitron.user.gtagMore = function () {
52		function gtag() { dataLayer.push(arguments); }
53
54		gtag('event', 'conversion', {
55			'send_to': tarteaucitron.user.adwordsconversionId + '/_lhRCJ-D1ZkDENq-77Qo'
56		});
57	};
58	(tarteaucitron.job = tarteaucitron.job || []).push('gtag');
59
60	// Adwords on forms
61	//AW-10848296794/r9zhCP2KhaADENq-77Qo
62	//AW-10848296794/uqTRCOz5hKADENq-77Qo
63	if ($('#quote-btn').length || $('#contact-btn').length) {
64		let adWordsLabel = '';
65
66		if ($('#quote-btn').length)
67			adWordsLabel = 'r9zhCP2KhaADENq-77Qo';
68
69		if ($('#contact-btn').length)
70			adWordsLabel = 'uqTRCOz5hKADENq-77Qo';
71
72		document.addEventListener('wpcf7mailsent', function (event) {
73			tarteaucitron.user.gtagMore = function () {
74				function gtag() { dataLayer.push(arguments); }
75
76				gtag('event', 'conversion', {
77					'send_to': tarteaucitron.user.adwordsconversionId + '/' + adWordsLabel
78				});
79			};
80			(tarteaucitron.job = tarteaucitron.job || []).push('gtag');
81		}, false);
82	}
83
84	// Adwords on phone call
85	//AW-10848296794/HEUnCP-cg6ADENq-77Qo
86	tarteaucitron.user.gtagMore = function () {
87		function gtag() { dataLayer.push(arguments); }
88
89		gtag('config', tarteaucitron.user.adwordsconversionId + '/HEUnCP-cg6ADENq-77Qo', {
90			'phone_conversion_number': $('.contact_cta > span').html().trim()
91		});
92	};
93	(tarteaucitron.job = tarteaucitron.job || []).push('gtag');
94}
95
96document.addEventListener('DOMContentLoaded', function() {
97    const faqItems = document.querySelectorAll('.faq-item');
98
99    faqItems.forEach(item => {
100        const question = item.querySelector('.question');
101        const answer = item.querySelector('.answer');
102        const icon = item.querySelector('svg');
103
104        question.addEventListener('click', function() {
105            if (item.classList.contains('open')) {
106                item.classList.remove('open');
107                answer.style.height = 0;
108                answer.style.opacity = 0;
109                setTimeout(() => {
110                    answer.style.display = 'none';
111                }, 300); // match the CSS transition duration
112                icon.style.transform = 'rotate(0deg)';
113            } else {
114                item.classList.add('open');
115                answer.style.display = 'block';
116                const answerHeight = answer.scrollHeight;
117                answer.style.height = answerHeight + 'px';
118                answer.style.opacity = 1;
119                icon.style.transform = 'rotate(90deg)';
120            }
121        });
122    });
123});

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.