PageSourceSearch

https://www.appai.org.br/wp-content/themes/total-school-child/js/javascript.js

js appai.org.br collected 2026-10-07 22:22:23 UTC 4,628 bytes, 153 lines download raw bytes

1jQuery(document).ready(function () {
2  var appendNumber = 4;
3  var prependNumber = 1;
4
5  if (jQuery(window).width() <= 768) {
6    var swiper = new Swiper(".swiper-container", {
7      pagination: ".swiper-pagination",
8      nextButton: ".swiper-button-next",
9      prevButton: ".swiper-button-prev",
10      slidesPerView: 2,
11      spaceBetween: 30,
12      loop: true,
13    });
14  }
15  if (jQuery(window).width() <= 460) {
16    var swiper = new Swiper(".swiper-container", {
17      pagination: ".swiper-pagination",
18      nextButton: ".swiper-button-next",
19      prevButton: ".swiper-button-prev",
20      slidesPerView: 1,
21      spaceBetween: 30,
22      loop: true,
23    });
24  } else {
25    var swiper = new Swiper(".swiper-container", {
26      pagination: ".swiper-pagination",
27      nextButton: ".swiper-button-next",
28      prevButton: ".swiper-button-prev",
29      slidesPerView: 4,
30      spaceBetween: 30,
31      loop: true,
32    });
33  }
34
35  jQuery(".submit-search").click(function () {
36    jQuery("#form-appai").submit();
37  });
38
39  jQuery("#div-radio").hover(
40    function () {
41      jQuery("#div-radio-musica").removeClass("div-radio-musica-hidden");
42    },
43    function () {
44      jQuery("#div-radio-musica").addClass("div-radio-musica-hidden");
45    }
46  );
47  var swiper = new Swiper(".swiperRevistas", {
48    slidesPerView: 1,
49    spaceBetween: 10,
50    loop: true,
51    // autoplay: {
52    //   delay: 10000,
53    //   disableOnInteraction: false,
54    // },
55    pagination: {
56      el: ".swiper-pagination",
57      clickable: true,
58    },
59    breakpoints: {
60      575: {
61        slidesPerView: 2,
62        spaceBetween: 20,
63      },
64      768: {
65        slidesPerView: 3,
66        spaceBetween: 30,
67      },
68    },
69  });
70});
71
72(function ($) {
73  $(document).ready(function () {
74    $(".header-new-topo .btn-hamburguer").click(function () {
75      $(this).toggleClass("active");
76      $("#header-new .nav-menu-drop").toggleClass("active");
77      $("body").toggleClass("noscroll");
78    });
79
80    $(".menu-item-has-children").click(function () {
81      $(this).toggleClass("aberto");
82      $(this).children(".sub-menu").toggleClass("aberto");
83    });
84
85    // Ao clicar no botão de submit
86    $("#header-new .header-topo-mobile .search button").click(function (event) {
87      event.preventDefault();
88      if ($("#header-new .header-topo-mobile .search").hasClass("aberto")) {
89        $("#header-new .header-topo-mobile form").submit();
90      } else {
91        $("#header-new .header-topo-mobile .search").addClass("aberto");
92      }
93    });
94
95    $(document).click(function (event) {
96      if (
97        !$(event.target).closest("#header-new .header-topo-mobile .search")
98          .length
99      ) {
100        $("#header-new .header-topo-mobile .search").removeClass("aberto");
101      }
102    });
103  });
104})(jQuery);
105
106document.addEventListener("DOMContentLoaded", function () {
107  // Função para animar a contagem até o número final
108  function contarNumero(elemento, valorFinal) {
109    let contador = 0;
110    const tempoTotal = 2000; // 2 segundos
111    const incrementoPorIntervalo = valorFinal / (tempoTotal / 10); // 10 milissegundos de intervalo entre os incrementos
112
113    // Usa setInterval para incrementar o número
114    let intervaloID = setInterval(() => {
115      if (contador < valorFinal) {
116        contador += incrementoPorIntervalo;
117        elemento.innerText = Math.floor(contador); // Atualiza o número exibido
118      } else {
119        clearInterval(intervaloID); // Para quando atingir o valor final
120      }
121    }, 10); // Intervalo de 10 milissegundos
122  }
123
124  // Função para verificar quando os elementos entram na tela
125  function criarObserver() {
126    const elementos = document.querySelectorAll(".count");
127
128    // Configuração do Intersection Observer
129    const observer = new IntersectionObserver(
130      (entradas, observer) => {
131        entradas.forEach((entrada) => {
132          if (entrada.isIntersecting) {
133            const elemento = entrada.target;
134            const valorFinal = parseInt(elemento.innerText, 10);
135            contarNumero(elemento, valorFinal);
136            observer.unobserve(elemento); // Para de observar o elemento após a animação
137          }
138        });
139      },
140      {
141        threshold: 0.5, // 50% do elemento precisa estar visível na tela
142      }
143    );
144
145    // Observa cada elemento
146    elementos.forEach((elemento) => {
147      observer.observe(elemento);
148    });
149  }
150
151  // Chama a função para começar a observação dos elementos
152  criarObserver();
153});

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.