PageSourceSearch

https://www.ffbatiment.fr/-/media/Themes/FFB/FFBatiment/FFBatiment…&hash=2066E3C4E5E22F9BD6F32455634D74FE

js ffbatiment.fr collected 2026-09-24 18:17:40 UTC 3,617 bytes, 121 lines download raw bytes

1jQuery.noConflict();
2jQuery(document).ready(function ($) {
3  $(".but-also").each(function () {
4    var component = $(this);
5    var slides = component.find(".swiper-slide");
6
7    //Slider setup
8    var mobileSlider = null;
9    var swiperDestroyed = true;
10    var initSwiper = false;
11
12    //Init slider function
13    function startMobileSlider() {
14      mobileSlider = new Swiper('.swiper-container', {
15        direction: 'horizontal',
16        loop: false,
17        slidesPerView: 'auto',
18        watchOverflow: true,
19        navigation: {
20          nextEl: '.custom-arrow-right',
21          prevEl: '.custom-arrow-left'
22        },
23        pagination: {
24          el: '.swiper-pagination',
25          clickable: false,
26          dynamicBullets: true,
27          dynamicMainBullets: 3
28        }
29      });
30    }
31
32    //Check and init or destroy slider on resize event
33    if (component.length > 0) {
34      window.addEventListener("resize", function () {
35        if (window.matchMedia("(max-width:991px)").matches && initSwiper == false) {
36          startMobileSlider();
37          initSwiper = true;
38          swiperDestroyed = false;
39        } else {
40          if (mobileSlider && window.matchMedia("(min-width:992px)").matches && swiperDestroyed == false) {
41            mobileSlider.detachEvents();
42            mobileSlider.destroy(true, true);
43            initSwiper = false;
44            swiperDestroyed = true;
45          }
46        }
47      });
48    }
49
50    //Check and init slider
51    if (window.matchMedia("(max-width:767px)").matches && initSwiper == false && component.length > 0) {
52      startMobileSlider();
53      swiperDestroyed = false;
54      initSwiper = true;
55    }
56
57    //Check size on mobile
58    slides.each(function () {
59      var container = $(this).find(".introduction");
60      var button = $(this).find(".mobile-button");
61      var buttonLink = button.find("a");
62      var buttonMore = buttonLink.text();
63      var buttonLess = buttonLink.data("read-less");
64      var defaultHeight = container.outerHeight(true);
65      function checkSize() {
66        newHeight = container.outerHeight(true);
67        if (newHeight > 249 && window.matchMedia("(max-width:767px)").matches) {
68          button.removeClass("d-none");
69          container.addClass("collapsed");
70          container.css({
71            'max-height': '250px'
72          });
73        } else {
74          button.addClass("d-none");
75          container.removeClass("collapsed");
76          container.css({
77            'max-height': ''
78          });
79        }
80      }
81      button.click(function () {
82        if (container.hasClass("collapsed")) {
83          buttonLink.text(buttonLess);
84          buttonLink.addClass("icon-rotate-top");
85          container.removeClass("collapsed");
86          container.css({
87            'max-height': 'max-content'
88          });
89        } else {
90          buttonLink.text(buttonMore);
91          buttonLink.removeClass("icon-rotate-top");
92          container.addClass("collapsed");
93          container.css({
94            'max-height': '250px'
95          });
96        }
97      });
98      var rtime;
99      var timeout = false;
100      var delta = 200;
101      $(window).resize(function () {
102        rtime = new Date();
103        if (timeout === false) {
104          timeout = true;
105          setTimeout(resizeend, delta);
106        }
107      });
108      function resizeend() {
109        if (new Date() - rtime < delta) {
110          setTimeout(resizeend, delta);
111        } else {
112          timeout = false;
113          checkSize();
114        }
115      }
116      if (window.matchMedia("(max-width:767px)").matches) {
117        checkSize();
118      }
119    });
120  });
121});

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.