PageSourceSearch

https://www.kirikhanolay.com.tr/wp-content/themes/theHaberV9/js/tema.js?ver=1771269259

js kirikhanolay.com.tr collected 2026-10-04 09:06:41 UTC 25,173 bytes, 1,049 lines download raw bytes

1// Yapışkan Menü
2document.addEventListener("DOMContentLoaded", function () {
3const navbar = document.querySelector(".nav");
4if (!navbar) return;
5
6const scrollPoint = 67;
7let isSticky = false;
8let ticking = false;
9
10function toggleSticky() {
11const scrollY = window.scrollY || 0;
12
13if (scrollY >= scrollPoint && !isSticky) {
14navbar.classList.add("sticky");
15isSticky = true;
16} else if (scrollY < scrollPoint && isSticky) {
17navbar.classList.remove("sticky");
18isSticky = false;
19}
20}
21
22window.addEventListener("scroll", function () {
23if (!ticking) {
24window.requestAnimationFrame(function () {
25toggleSticky();
26ticking = false;
27});
28ticking = true;
29}
30});
31
32toggleSticky(); // Sayfa açıldığında kontrol et
33});
34
35
36
37// kule reklam //
38document.addEventListener("DOMContentLoaded", function () {
39const solda = document.getElementById("soldasabit");
40const saga = document.getElementById("sagdasabit");
41
42if (!solda && !saga) return;
43
44let currentTop = 125;
45let ticking = false;
46
47function kuleTopGuncelle() {
48const scrollY = window.scrollY || window.pageYOffset || 0;
49const yeniTop = scrollY > 67 ? 25 : 125;
50
51if (yeniTop !== currentTop) {
52if (solda) solda.style.top = `${yeniTop}px`;
53if (saga) saga.style.top = `${yeniTop}px`;
54currentTop = yeniTop;
55}
56}
57
58window.addEventListener("scroll", function () {
59if (!ticking) {
60requestAnimationFrame(function () {
61kuleTopGuncelle();
62ticking = false;
63});
64ticking = true;
65}
66});
67
68kuleTopGuncelle();
69});
70// kule reklam //
71
72
73
74// h3 data-control //
75window.addEventListener("load", function () {
76setTimeout(function () {
77const h3 = document.querySelector(".site_baslik h3");
78const underline = document.querySelector(".site_baslik div[data-control]");
79
80if (!h3 || !underline) return;
81
82const h3Styles = window.getComputedStyle(h3);
83const totalPadding =
84parseFloat(h3Styles.paddingLeft || 0) + parseFloat(h3Styles.paddingRight || 0);
85
86const trueWidth = h3.clientWidth - totalPadding - 15;
87
88if (trueWidth > 0) {
89underline.style.width = `${trueWidth}px`;
90}
91}, 50);
92});
93// h3 data-control //
94
95
96// Mobil Menü ve Sub Menü //
97jQuery(function ($) {
98const $hamburger = $("#hamburger-icon");
99const $menu = $("#side-menu");
100const $overlay = $("#menu-overlay");
101let menuLoaded = false;
102
103function closeMenu() {
104$menu.removeClass("open");
105$overlay.removeClass("open");
106}
107
108function initSubMenus() {
109// ▶️ Submenu ikonlarını ekle
110$menu.find("li.menu-item-has-children > a").each(function () {
111if (!$(this).find('.submenu-icon').length) {
112$(this).append('<span class="submenu-icon iconify" data-icon="fa6-solid:angle-down"></span>');
113}
114});
115
116$menu.find("li.menu-item-has-children").each(function () {
117const $li = $(this);
118const $link = $li.children("a").first();
119const $submenu = $li.children("ul").first();
120
121$link.off("click").on("click", function (e) {
122e.preventDefault();
123
124const isOpen = $li.hasClass("submenu-open");
125
126// Tüm submenu'leri kapat
127$menu.find("li.menu-item-has-children").removeClass("submenu-open").children("ul").css("max-height", "0");
128$menu.find("li.menu-item-has-children > a").removeClass("active");
129
130// Eğer kapalıysa aç
131if (!isOpen) {
132$li.addClass("submenu-open");
133$link.addClass("active");
134$submenu.css("max-height", $submenu[0].scrollHeight + "px");
135}
136});
137});
138}
139
140function loadMenuContent() {
141if (menuLoaded) return;
142
143const template = document.getElementById("mobile-menu-template");
144if (template) {
145const clone = template.content.cloneNode(true);
146$menu.append(clone);
147
148$("#close-menu").on("click", closeMenu);
149initSubMenus(); // submenu'leri başlat
150
151if (typeof thewpHavaDurumuInit === 'function') {
152thewpHavaDurumuInit();
153}
154
155
156menuLoaded = true;
157}
158}
159
160$hamburger.on("click", function () {
161loadMenuContent();
162$menu.addClass("open");
163$overlay.addClass("open");
164});
165
166$overlay.on("click", closeMenu);
167});
168// Mobil Menü ve Sub Menü //
169
170
171
172
173// Arama Alani //
174document.addEventListener("DOMContentLoaded", function() {
175const aramaButonu = document.getElementById("aramaAc");
176const aramaPaneli = document.getElementById("aramaPaneli");
177const aramaKapat = document.getElementById("aramaKapat");
178const aramaOverlay = document.getElementById("aramaOverlay");
179if (!aramaButonu || !aramaPaneli || !aramaOverlay) {
180console.error("Arama kutusu elemanları bulunamadı!");
181return;
182}
183aramaButonu.addEventListener("click", function() {
184if (aramaPaneli.classList.contains("show")) {
185aramaPaneli.classList.remove("show");
186aramaOverlay.classList.remove("active");
187setTimeout(() => {
188aramaPaneli.style.display = "none";
189aramaOverlay.style.display = "none";
190}, 300);
191} else {
192aramaPaneli.style.display = "block";
193aramaOverlay.style.display = "block";
194setTimeout(() => {
195aramaPaneli.classList.add("show");
196aramaOverlay.classList.add("active");
197}, 10);
198}
199});
200document.addEventListener("click", function(event) {
201if (
202aramaPaneli.contains(event.target) ||
203aramaButonu.contains(event.target) ||
204event.target.closest("form")
205) {
206return;
207}
208aramaPaneli.classList.remove("show");
209aramaOverlay.classList.remove("active");
210setTimeout(() => {
211aramaPaneli.style.display = "none";
212aramaOverlay.style.display = "none";
213}, 300);
214});
215});
216// Arama Alani //
217
218
219
220
221
222// Son Dakika Slider //
223document.addEventListener("DOMContentLoaded", function () {
224const container = document.querySelector(".ust_son_dakika");
225if (!container) return;
226
227const observer = new IntersectionObserver((entries, obs) => {
228entries.forEach(entry => {
229if (entry.isIntersecting) {
230const swiper = new Swiper(".ust_son_dakika", {
231slidesPerView: 1,
232spaceBetween: 10,
233loop: false,
234speed: 400,
235navigation: {
236nextEl: ".son_dakika_next",
237prevEl: ".son_dakika_prev"
238},
239autoplay: {
240delay: 4500,
241disableOnInteraction: false,
242},
243observer: true,
244observeParents: true,
245mousewheel: false,
246keyboard: { enabled: false },
247on: {
248init: function () {
249const swiperInstance = this;
250
251container.classList.add("swiper-initialized");
252
253container.addEventListener("mouseenter", () => swiperInstance.autoplay.stop());
254container.addEventListener("mouseleave", () => swiperInstance.autoplay.start());
255
256setTimeout(() => {
257swiperInstance.update();
258}, 100);
259}
260}
261});
262
263obs.unobserve(entry.target); // sadece bir kez gözlemle
264}
265});
266}, {
267rootMargin: "0px 0px 200px 0px",
268threshold: 0.3
269});
270
271observer.observe(container);
272});
273// Son Dakika Slider //
274
275
276
277
278
279
280// Finans Slider //
281document.addEventListener("DOMContentLoaded", function () {
282const container = document.querySelector(".ust_finans");
283if (!container) return;
284
285const observer = new IntersectionObserver((entries, obs) => {
286entries.forEach(entry => {
287if (entry.isIntersecting) {
288const swiper = new Swiper(".ust_finans", {
289slidesPerView: 3,
290spaceBetween: 10,
291freeMode: true,
292loop: false,
293speed: 2000,
294allowTouchMove: true,
295autoplay: {
296delay: 1000,
297disableOnInteraction: false,
298},
299preloadImages: false,
300lazy: {
301loadOnTransitionStart: true,
302loadPrevNext: true,
303},
304breakpoints: {
305640:  { slidesPerView: 4, spaceBetween: 10 },
306768:  { slidesPerView: 4, spaceBetween: 15 },
307980:  { slidesPerView: 5, spaceBetween: 15 },
3081024: { slidesPerView: 7, spaceBetween: 20 },
309}
310});
311
312container.addEventListener("mouseenter", () => swiper.autoplay.stop());
313container.addEventListener("mouseleave", () => swiper.autoplay.start());
314
315obs.unobserve(container);
316}
317});
318}, {
319rootMargin: "0px 0px 200px 0px",
320threshold: 0.3
321});
322
323observer.observe(container);
324});
325// Finans Slider //
326
327// Yatay Manset //
328document.addEventListener("DOMContentLoaded", function () {
329const container = document.querySelector(".kategori_manset_iki");
330if (!container) return;
331
332const observer = new IntersectionObserver((entries, obs) => {
333entries.forEach(entry => {
334if (!entry.isIntersecting) return;
335
336new Swiper(".kategori_manset_iki", {
337loop: true,
338autoplay: {
339delay: 4500,
340disableOnInteraction: false,
341},
342pagination: {
343el: ".kategor_manset_numaralar",
344clickable: true,
345renderBullet(index, className) {
346const slides = this.slides;
347const slide = slides[index];
348const link = slide?.querySelector("a")?.getAttribute("href") || "#";
349return `<span class="${className}"><a href="${link}">${index + 1}</a></span>`;
350}
351},
352on: {
353init() {
354requestAnimationFrame(() => {
355this.pagination.el
356.querySelectorAll(".swiper-pagination-bullet")
357.forEach((bullet, index) => {
358bullet.addEventListener("mouseenter", () => {
359this.slideTo(index);
360});
361});
362});
363}
364}
365});
366
367obs.unobserve(container);
368});
369}, {
370rootMargin: "0px 0px 200px 0px",
371threshold: 0.3
372});
373
374observer.observe(container);
375});
376// Yatay Manset //
377
378
379// Manset Alani Buyuk //
380document.addEventListener("DOMContentLoaded", function () {
381const container = document.querySelector(".manset_buyuk");
382if (!container) return;
383
384const observer = new IntersectionObserver((entries, obs) => {
385entries.forEach(entry => {
386if (entry.isIntersecting) {
387const swiperBuyuk = new Swiper(".manset_buyuk", {
388speed: 400,
389autoplay: {
390delay: 6000,
391disableOnInteraction: false,
392},
393pagination: {
394el: ".buyuk_manset_numaralar",
395clickable: true,
396renderBullet: function (index, className) {
397const slide = this.slides[index];
398const href = slide?.querySelector("a")?.getAttribute("href") || "#";
399return `<span class="${className}" onclick="window.location.href='${href}'">${index + 1}</span>`;
400}
401},
402on: {
403init: function () {
404const bullets = this.pagination.el?.querySelectorAll('.swiper-pagination-bullet');
405bullets?.forEach((bullet, index) => {
406bullet.addEventListener('mouseenter', () => {
407this.slideTo(index);
408}, { passive: true });
409});
410}
411}
412});
413
414obs.unobserve(entry.target);
415}
416});
417}, {
418rootMargin: "0px 0px 200px 0px",
419threshold: 0.3
420});
421
422observer.observe(container);
423});
424// Manset Alani Buyuk //
425
426
427// Manset Alani Kucuk //
428document.addEventListener("DOMContentLoaded", function () {
429const container = document.querySelector(".manset_kucuk");
430if (!container) return;
431
432const observer = new IntersectionObserver((entries, obs) => {
433entries.forEach(entry => {
434if (entry.isIntersecting) {
435const swiperKucuk = new Swiper(".manset_kucuk", {
436speed: 400,
437autoplay: {
438delay: 5000,
439disableOnInteraction: false,
440},
441pagination: {
442el: ".kucuk_manset_numaralar",
443clickable: true,
444renderBullet: function (index, className) {
445const slides = this.slides;
446const realIndex = index;
447if (!slides[realIndex]) {
448return `<span class="${className}">${index + 1}</span>`;
449}
450const linkEl = slides[realIndex].querySelector("a");
451const slideLink = linkEl ? linkEl.getAttribute("href") : "#";
452return `<span class="${className}" onclick="window.location.href='${slideLink}'">${index + 1}</span>`;
453}
454},
455breakpoints: {
4560:    { slidesPerView: 2, spaceBetween: 10 },
457640:  { slidesPerView: 3, spaceBetween: 10 },
458768:  { slidesPerView: 3, spaceBetween: 10 },
459980:  { slidesPerView: 3, spaceBetween: 10 },
460981:  { slidesPerView: 4, spaceBetween: 10 },
4611200: { slidesPerView: 1, spaceBetween: 10 }
462},
463on: {
464init: function () {
465const swiperInstance = this;
466setTimeout(() => {
467if (swiperInstance.pagination && swiperInstance.pagination.el) {
468const bullets = swiperInstance.pagination.el.querySelectorAll('.swiper-pagination-bullet');
469bullets.forEach((bullet, index) => {
470bullet.addEventListener('mouseenter', () => {
471swiperInstance.slideTo(index);
472});
473});
474}
475}, 50);
476}
477}
478});
479
480obs.unobserve(entry.target);
481}
482});
483}, {
484rootMargin: "0px 0px 200px 0px",
485threshold: 0.3
486});
487
488observer.observe(container);
489});
490// Manset Alani Kucuk //
491
492
493// sürmanşet Haberler //
494document.addEventListener("DOMContentLoaded", function () {
495const container = document.querySelector(".sicak_gelismeler");
496if (!container) return;
497
498const observer = new IntersectionObserver((entries, obs) => {
499entries.forEach(entry => {
500if (entry.isIntersecting) {
501const swiper = new Swiper(".sicak_gelismeler", {
502loop: false,
503speed: 400,
504autoplay: {
505delay: 4500,
506disableOnInteraction: false,
507},
508observer: true,
509observeParents: true,
510mousewheel: false,
511keyboard: { enabled: false },
512breakpoints: {
5130:   { slidesPerView: 2, spaceBetween: 10 },
514600: { slidesPerView: 2, spaceBetween: 15 },
515768: { slidesPerView: 3, spaceBetween: 20 },
516980: { slidesPerView: 4, spaceBetween: 20 },
517},
518on: {
519init: function () {
520const swiperInstance = this;
521
522container.classList.add("swiper-initialized");
523
524container.addEventListener("mouseenter", () => swiperInstance.autoplay.stop());
525container.addEventListener("mouseleave", () => swiperInstance.autoplay.start());
526
527setTimeout(() => {
528swiperInstance.update();
529}, 100);
530}
531}
532});
533
534obs.unobserve(entry.target); // sadece bir kez gözlemle
535}
536});
537}, {
538rootMargin: "0px 0px 200px 0px",
539threshold: 0.3
540});
541
542observer.observe(container);
543});
544// sürmanşet Haberler //
545
546
547// Yazarlar Anasayfa //
548document.addEventListener("DOMContentLoaded", function () {
549const container = document.querySelector(".anasayfa_yazars");
550if (!container) return;
551
552const observer = new IntersectionObserver((entries, obs) => {
553entries.forEach(entry => {
554if (entry.isIntersecting) {
555const swiper = new Swiper(".anasayfa_yazars", {
556loop: false,
557speed: 400,
558autoplay: {
559delay: 5000,
560disableOnInteraction: false,
561},
562mousewheel: false,
563keyboard: {
564enabled: false,
565},
566navigation: {
567nextEl: ".yazarlar_next",
568prevEl: ".yazarlar_prev"
569},
570breakpoints: {
5710:   { slidesPerView: 1, spaceBetween: 10 },
572768: { slidesPerView: 2, spaceBetween: 20 },
573980: { slidesPerView: 3, spaceBetween: 20 },
5741024: { slidesPerView: 4, spaceBetween: 20 },
575},
576on: {
577init: function () {
578const swiperInstance = this;
579container.addEventListener("mouseenter", () => swiperInstance.autoplay.stop());
580container.addEventListener("mouseleave", () => swiperInstance.autoplay.start());
581}
582}
583});
584
585obs.unobserve(entry.target); // sadece bir defa çalışsın
586}
587});
588}, {
589rootMargin: "0px 0px 200px 0px",
590threshold: 0.3
591});
592
593observer.observe(container);
594});
595// Yazarlar Anasayfa //
596
597
598// One Cikan Haberler //
599document.addEventListener("DOMContentLoaded", function () {
600const container = document.querySelector(".one_cikanlar");
601if (!container) return;
602
603const observer = new IntersectionObserver((entries, obs) => {
604entries.forEach(entry => {
605if (entry.isIntersecting) {
606const swiper = new Swiper(".one_cikanlar", {
607loop: false,
608speed: 400,
609autoplay: {
610delay: 4000,
611disableOnInteraction: false,
612},
613mousewheel: false,
614keyboard: {
615enabled: false,
616},
617navigation: {
618nextEl: ".swiper-button-next",
619prevEl: ".swiper-button-prev"
620},
621breakpoints: {
6220:   { slidesPerView: 2, spaceBetween: 10 },
623600: { slidesPerView: 2, spaceBetween: 15 },
624768: { slidesPerView: 3, spaceBetween: 20 },
625980: { slidesPerView: 4, spaceBetween: 20 },
626},
627on: {
628init: function () {
629const swiperInstance = this;
630container.addEventListener("mouseenter", () => swiperInstance.autoplay.stop());
631container.addEventListener("mouseleave", () => swiperInstance.autoplay.start());
632}
633}
634});
635
636obs.unobserve(entry.target); // sadece bir defa çalışsın
637}
638});
639}, {
640rootMargin: "0px 0px 200px 0px",
641threshold: 0.3
642});
643
644observer.observe(container);
645});
646// One Cikan Haberler //
647
648
649// Resmi ilanlar //
650document.addEventListener("DOMContentLoaded", function () {
651const container = document.querySelector(".resmi_ilanlar_ana");
652if (!container) return;
653
654const observer = new IntersectionObserver((entries, obs) => {
655entries.forEach(entry => {
656if (entry.isIntersecting) {
657const swiper = new Swiper(".resmi_ilanlar_ana", {
658loop: false,
659speed: 400,
660autoplay: {
661delay: 4000,
662disableOnInteraction: false,
663},
664mousewheel: false,
665keyboard: { enabled: false },
666navigation: {
667nextEl: ".resmiilanlar_next",
668prevEl: ".resmiilanlar_prev"
669},
670breakpoints: {
6710:   { slidesPerView: 2, spaceBetween: 20 },
672600: { slidesPerView: 2, spaceBetween: 20 },
673768: { slidesPerView: 3, spaceBetween: 20 },
674980: { slidesPerView: 4, spaceBetween: 20 },
675},
676on: {
677init: function () {
678const swiperInstance = this;
679
680container.addEventListener("mouseenter", () => swiperInstance.autoplay.stop());
681container.addEventListener("mouseleave", () => swiperInstance.autoplay.start());
682}
683}
684});
685
686obs.unobserve(entry.target); // sadece bir kez çalışsın
687}
688});
689}, {
690rootMargin: "0px 0px 200px 0px",
691threshold: 0.3
692});
693
694observer.observe(container);
695});
696// Resmi ilanlar //
697
698
699// Foto Galeri //
700document.addEventListener("DOMContentLoaded", function () {
701const galleryContainers = document.querySelectorAll(".fotogaleri_ana");
702if (!galleryContainers.length) return;
703
704galleryContainers.forEach((container, index) => {
705const swiperClass = `swiper-container-${index}`;
706const nextBtnClass = `swiper-button-next-${index}`;
707const prevBtnClass = `swiper-button-prev-${index}`;
708
709container.classList.add(swiperClass);
710const nextBtn = container.querySelector(".fotogaleri_next");
711const prevBtn = container.querySelector(".fotogaleri_prev");
712if (nextBtn) nextBtn.classList.add(nextBtnClass);
713if (prevBtn) prevBtn.classList.add(prevBtnClass);
714
715const observer = new IntersectionObserver((entries, obs) => {
716entries.forEach(entry => {
717if (entry.isIntersecting) {
718const swiper = new Swiper(`.${swiperClass}`, {
719loop: false,
720speed: 400,
721autoplay: {
722delay: 4000,
723disableOnInteraction: false,
724},
725mousewheel: false,
726keyboard: { enabled: false },
727navigation: {
728nextEl: `.${nextBtnClass}`,
729prevEl: `.${prevBtnClass}`,
730},
731breakpoints: {
7320:   { slidesPerView: 1, spaceBetween: 10 },
733600: { slidesPerView: 2, spaceBetween: 15 },
734768: { slidesPerView: 2, spaceBetween: 20 },
735980: { slidesPerView: 3, spaceBetween: 20 },
736},
737on: {
738init: function () {
739const swiperInstance = this;
740container.addEventListener("mouseenter", () => swiperInstance.autoplay.stop());
741container.addEventListener("mouseleave", () => swiperInstance.autoplay.start());
742}
743}
744});
745
746obs.unobserve(entry.target); // sadece bir kez çalışsın
747}
748});
749}, {
750rootMargin: "0px 0px 200px 0px",
751threshold: 0.3
752});
753
754observer.observe(container);
755});
756});
757
758// Foto Galeri //
759
760// Kripto Slider //
761document.addEventListener("DOMContentLoaded", function () {
762const container = document.querySelector(".yatay_kripto");
763if (!container) return;
764
765const observer = new IntersectionObserver((entries, obs) => {
766entries.forEach(entry => {
767if (entry.isIntersecting) {
768const swiper = new Swiper(".yatay_kripto", {
769slidesPerView: 2,
770spaceBetween: 10,
771freeMode: true,
772loop: false,
773speed: 2000,
774allowTouchMove: true,
775autoplay: {
776delay: 1000,
777disableOnInteraction: false,
778},
779preloadImages: false,
780lazy: {
781loadOnTransitionStart: true,
782loadPrevNext: true,
783},
784breakpoints: {
785640: { slidesPerView: 4, spaceBetween: 10 },
786768: { slidesPerView: 4, spaceBetween: 15 },
787980: { slidesPerView: 5, spaceBetween: 15 },
7881024: { slidesPerView: 7, spaceBetween: 20 },
789}
790});
791
792container.addEventListener("mouseenter", () => swiper.autoplay.stop());
793container.addEventListener("mouseleave", () => swiper.autoplay.start());
794
795obs.unobserve(entry.target); // sadece bir kez tetiklensin
796}
797});
798}, {
799rootMargin: "0px 0px 200px 0px",
800threshold: 0.3
801});
802
803observer.observe(container);
804});
805// Kripto Slider //
806
807
808// Spor Slider //
809document.addEventListener("DOMContentLoaded", function () {
810const container = document.querySelector(".spor_sablon_slideri");
811if (!container) return;
812
813let swiperInstance;
814
815function ortalaButonlar() {
816const figure = document.querySelector('.anasayfa_kategori_yedi .haber figure');
817const prevBtn = document.querySelector('.spor_sablon_slider_prev');
818const nextBtn = document.querySelector('.spor_sablon_slider_next');
819
820if (figure && prevBtn && nextBtn) {
821const yukseklik = figure.offsetHeight;
822const topDegeri = (yukseklik / 2) + 'px';
823prevBtn.style.top = topDegeri;
824nextBtn.style.top = topDegeri;
825}
826}
827
828function initializeSwiper() {
829swiperInstance = new Swiper(".spor_sablon_slideri", {
830speed: 800,
831loop: false,
832fadeEffect: {
833crossFade: true,
834},
835autoplay: {
836delay: 5000,
837disableOnInteraction: false,
838},
839navigation: {
840nextEl: ".spor_sablon_slider_next",
841prevEl: ".spor_sablon_slider_prev",
842},
843on: {
844init: function () {
845ortalaButonlar();
846}
847}
848});
849
850container.addEventListener("mouseenter", () => swiperInstance.autoplay.stop());
851container.addEventListener("mouseleave", () => swiperInstance.autoplay.start());
852}
853
854const observer = new IntersectionObserver((entries, obs) => {
855entries.forEach(entry => {
856if (entry.isIntersecting) {
857initializeSwiper();
858obs.unobserve(entry.target); // sadece bir kez çalışsın
859}
860});
861}, {
862rootMargin: "0px 0px 200px 0px",
863threshold: 0.3
864});
865
866observer.observe(container);
867window.addEventListener('resize', ortalaButonlar);
868});
869// Spor Slider //
870
871
872// Puan Durumu Slider //
873document.addEventListener("DOMContentLoaded", function () {
874const container = document.querySelector(".yatay_puan_slider");
875if (!container) return;
876
877const observer = new IntersectionObserver((entries, obs) => {
878entries.forEach(entry => {
879if (entry.isIntersecting) {
880const swiper = new Swiper(".yatay_puan_slider", {
881slidesPerView: 4,
882spaceBetween: 15,
883loop: false,
884speed: 600,
885autoplay: {
886delay: 4500,
887disableOnInteraction: false
888},
889navigation: {
890nextEl: ".yatay_puandurumu_slider_next",
891prevEl: ".yatay_puandurumu_slider_prev"
892},
893breakpoints: {
894320: { slidesPerView: 4 },
895480: { slidesPerView: 5 },
896640: { slidesPerView: 5 },
897768: { slidesPerView: 8 },
8981024: { slidesPerView: 12 }
899}
900});
901
902container.addEventListener("mouseenter", () => swiper.autoplay.stop());
903container.addEventListener("mouseleave", () => swiper.autoplay.start());
904
905// Sadece bir kez gözlemle
906obs.unobserve(entry.target);
907}
908});
909}, {
910rootMargin: "0px 0px 200px 0px",
911threshold: 0.3
912});
913
914observer.observe(container);
915});
916// Puan Durumu Slider //
917
918
919// Fikstür Slider //
920document.addEventListener("DOMContentLoaded", function () {
921const container = document.querySelector(".yatay_fikstur_slider");
922if (!container) return;
923
924const observer = new IntersectionObserver((entries, obs) => {
925entries.forEach(entry => {
926if (entry.isIntersecting) {
927const swiper = new Swiper(".yatay_fikstur_slider", {
928slidesPerView: 1,
929spaceBetween: 20,
930loop: false,
931speed: 600,
932autoplay: {
933delay: 4000,
934disableOnInteraction: false
935},
936navigation: {
937nextEl: ".yatay_fikstur_slider_next",
938prevEl: ".yatay_fikstur_slider_prev"
939},
940breakpoints: {
941480: { slidesPerView: 1 },
942640: { slidesPerView: 2 },
943768: { slidesPerView: 3 },
9441024: { slidesPerView: 4 }
945}
946});
947
948container.addEventListener("mouseenter", () => swiper.autoplay.stop());
949container.addEventListener("mouseleave", () => swiper.autoplay.start());
950
951// Sadece bir kez tetiklenmesini sağla
952obs.unobserve(entry.target);
953}
954});
955}, {
956rootMargin: "0px 0px 200px 0px",
957threshold: 0.3
958});
959
960observer.observe(container);
961});
962// Fikstür Slider //
963
964
965// Gazeteler Slider //
966document.addEventListener("DOMContentLoaded", () => {
967const container = document.querySelector(".yatay_gazete_slider");
968if (!container) return;
969
970const observer = new IntersectionObserver((entries, observer) => {
971entries.forEach(entry => {
972if (entry.isIntersecting) {
973const swiper = new Swiper(".yatay_gazete_slider", {
974slidesPerView: 2,
975spaceBetween: 20,
976loop: false,
977speed: 600,
978autoplay: {
979delay: 4000,
980disableOnInteraction: false
981},
982navigation: {
983nextEl: ".yatay_gazeteler_slider_next",
984prevEl: ".yatay_gazeteler_slider_prev"
985},
986breakpoints: {
987480: { slidesPerView: 3 },
988640: { slidesPerView: 4 },
989768: { slidesPerView: 5 },
9901024: { slidesPerView: 7 }
991}
992});
993
994container.addEventListener("mouseenter", () => swiper.autoplay.stop());
995container.addEventListener("mouseleave", () => swiper.autoplay.start());
996
997observer.unobserve(entry.target); // sadece bir kez tetikle
998}
999});
1000}, {
1001rootMargin: "0px 0px 200px 0px", // erken yükleme için
1002threshold: 0.3                   // slider’ın %30’u görünmeden tetiklenmez
1003});
1004
1005observer.observe(container);
1006});
1007// Gazeteler Slider //
1008
1009
1010
1011
1012
1013// Footer Accordion Menu //
1014document.addEventListener("DOMContentLoaded", function () {
1015const headers = document.querySelectorAll(".accordion-header");
1016
1017function handleAccordionClick(event) {
1018if (window.innerWidth > 768) return;
1019
1020const button = event.currentTarget;
1021const content = button.nextElementSibling;
1022
1023const isOpen = content.style.maxHeight;
1024
1025document.querySelectorAll(".accordion-content").forEach((el) => {
1026el.style.maxHeight = null;
1027el.previousElementSibling.classList.remove("active");
1028});
1029
1030if (!isOpen) {
1031content.style.maxHeight = content.scrollHeight + "px";
1032button.classList.add("active");
1033}
1034}
1035
1036headers.forEach((button) => {
1037button.addEventListener("click", handleAccordionClick);
1038});
1039
1040window.addEventListener("resize", () => {
1041if (window.innerWidth > 768) {
1042document.querySelectorAll(".accordion-content").forEach((el) => {
1043el.style.maxHeight = null;
1044el.previousElementSibling.classList.remove("active");
1045});
1046}
1047});
1048});
1049// Footer Accordion Menu //

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.