PageSourceSearch

https://yaqoot-sa.com/Views/Themes/skincare/V1/Home/Components/Slider/Slider.js

js yaqoot-sa.com collected 2026-09-26 05:15:52 UTC 5,238 bytes, 140 lines download raw bytes

1
2document.addEventListener('DOMContentLoaded', function () {
3    setTimeout(() => {
4        if ($(".tf-sw-slideshow").length > 0) {
5            var preview = $(".tf-sw-slideshow").data("preview");
6            var tablet = $(".tf-sw-slideshow").data("tablet");
7            var mobile = $(".tf-sw-slideshow").data("mobile");
8            var spacing = $(".tf-sw-slideshow").data("space");
9            var loop = $(".tf-sw-slideshow").data("loop");
10            var play = $(".tf-sw-slideshow").data("auto-play");
11            var delay = $(".tf-sw-slideshow").data("delay");
12            var speed = $(".tf-sw-slideshow").data("speed");
13            var centered = $(".tf-sw-slideshow").data("centered");
14            var swiper = new Swiper(".tf-sw-slideshow", {
15                autoplay: {
16                    delay: delay,
17                    disableOnInteraction: false,
18                    pauseOnMouseEnter: true,
19                },
20                autoplay: play,
21                slidesPerView: mobile,
22                loop: loop,
23                spaceBetween: 0,
24                speed: speed,
25                pagination: {
26                    el: ".sw-pagination-slider",
27                    clickable: true,
28                },
29                navigation: {
30                    clickable: true,
31                    nextEl: ".navigation-prev-slider",
32                    prevEl: ".navigation-next-slider",
33                },
34                centeredSlides: false,
35                breakpoints: {
36                    768: {
37                        slidesPerView: tablet,
38                        spaceBetween: spacing,
39                        centeredSlides: false,
40
41                    },
42                    1150: {
43                        slidesPerView: preview,
44                        spaceBetween: spacing,
45                        centeredSlides: centered,
46                    },
47                },
48            });
49
50
51        }
52
53        if ($(".tf-sw-mobile").length > 0) {
54            var swiperMb;
55            function initSwiper() {
56                if (matchMedia("only screen and (max-width: 767px)").matches) {
57                    if (!swiperMb) {
58                        var preview = $(".tf-sw-mobile").data("preview");
59                        var spacing = $(".tf-sw-mobile").data("space");
60
61                        swiperMb = new Swiper(".tf-sw-mobile", {
62                            slidesPerView: preview,
63                            spaceBetween: spacing,
64                            speed: 1000,
65                            pagination: {
66                                el: ".sw-pagination-mb",
67                                clickable: true,
68                            },
69                            navigation: {
70                                clickable: true,
71                                nextEl: ".nav-prev-mb",
72                                prevEl: ".nav-next-mb",
73                            },
74                        });
75                    }
76                } else {
77                    if (swiperMb) {
78                        swiperMb.destroy(true, true);
79                        swiperMb = null;
80                        $(".tf-sw-mobile .swiper-wrapper").removeAttr('style');
81                        $(".tf-sw-mobile .swiper-slide").removeAttr('style');
82                    }
83                }
84            }
85            initSwiper();
86            window.addEventListener("resize", function () {
87                initSwiper();
88            });
89
90
91        }
92
93
94        if ($(".tf-sw-mobile-1").length > 0) {
95            var swiperMb1;
96            function initSwiperMb() {
97                if (matchMedia("only screen and (max-width: 767px)").matches) {
98                    if (!swiperMb1) {
99                        var preview = $(".tf-sw-mobile-1").data("preview");
100                        var spacing = $(".tf-sw-mobile-1").data("space");
101
102                        swiperMb1 = new Swiper(".tf-sw-mobile-1", {
103                            slidesPerView: preview,
104                            spaceBetween: spacing,
105                            speed: 1000,
106                            pagination: {
107                                el: ".sw-pagination-mb-1",
108                                clickable: true,
109                            },
110                            navigation: {
111                                clickable: true,
112                                nextEl: ".nav-prev-mb-1",
113                                prevEl: ".nav-next-mb-1",
114                            },
115                        });
116                    }
117                } else {
118                    if (swiperMb1) {
119                        swiperMb1.destroy(true, true);
120                        swiperMb1 = null;
121                        $(".tf-sw-mobile-1 .swiper-wrapper").removeAttr('style');
122                        $(".tf-sw-mobile-1 .swiper-slide").removeAttr('style');
123                    }
124                }
125            }
126
127            initSwiperMb();
128            window.addEventListener("resize", function () {
129                initSwiperMb();
130            });
131
132
133        }
134
135
136
137
138    }, 100);
139});
140

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.