PageSourceSearch

https://kmu.edu.tr/Content/AnasayfaCssleri/HTML/assets/js/slider.js

js kmu.edu.tr collected 2026-10-02 06:35:29 UTC 19,084 bytes, 670 lines download raw bytes

1// Homepage 1 Showcase Slider
2if ($(".header-carousel").length > 0) {
3    $(".header-carousel").owlCarousel({
4        loop: true,
5        autoplay: false, //true if you want to enable autoplay
6        autoPlayTimeout: 1000,
7        margin: 0,
8        dots: true,
9        nav: true,
10        navText: ['<i class="flaticon-back"></i>', '<i class="flaticon-next"></i>'],
11        responsive: {
12            0: {
13                items: 1
14                // dots: treu,
15                // nav: false,
16            },
17            460: {
18                items: 1
19                // dots: false,
20                // nav: false,
21            },
22            599: {
23                items: 1
24                // dots: false,
25                // nav: false,
26            },
27            768: {
28                items: 1
29            },
30            960: {
31                items: 1
32            },
33            1200: {
34                items: 1
35            },
36            1920: {
37                items: 1
38            }
39        }
40    });
41}
42
43// ============================= Showcase Sliders ============================
44
45// Homepage 4
46if ($(".showcase-style-4").length > 0) {
47    $(".showcase-style-4 > .content-wrapper").slick({
48        infinite: true,
49        speed: 500,
50        dots: true,
51        arrows: false,
52        cssEase: "linear",
53        appendDots: $(".showcase-style-4 .slider-indicator-2")
54    });
55
56    $(".showcase-style-4 > .content-wrapper").on("beforeChange", function (
57        event,
58        slick,
59        currentSlide,
60        nextSlide
61    ) {
62        var currentSlideindex = nextSlide;
63        ++currentSlideindex;
64        $(".showcase-style-4 .slider-indicator-3 .current").text(
65            check_number(currentSlideindex)
66        );
67    });
68
69    function totalSlideNum(totalSlide) {
70        $(".showcase-style-4 .slider-indicator-3 .total").text(
71            check_number(totalSlide)
72        );
73    }
74
75    $(window).on("load", function () {
76        var totalSlide = $(".showcase-style-4 > .content-wrapper").slick("getSlick")
77            .slideCount;
78        totalSlideNum(totalSlide);
79    });
80
81    function check_number(num) {
82        var IsInteger = /^[0-9]+$/.test(num);
83        return IsInteger ? "0" + num : null;
84    }
85}
86
87// ============================= Showcase Style 2 ==========================
88
89
90//https://stackoverflow.com/questions/50798315/slick-slider-slide-video-when-finished
91//   autoplaySpeed: 110000,
92var dvUniversite = document.getElementById("dvUniversiteAdi");
93if ($(".showcase-style-2").length > 0) {
94    $(".showcase-style-2 .slider-wrapper").slick({
95        dots: true,
96        infinite: true,
97        speed: 300,
98        fade: true,
99        autoplay: true,
100
101        autoplaySpeed: 3000,
102        arrows: true,
103        cssEase: "linear",
104        prevArrow: $(".indicator-style-2 > .flaticon-back"),
105        nextArrow: $(".indicator-style-2 > .flaticon-next"),
106        appendDots: $(".indicator-style-2 .indicator-style-2 .nums")
107    });
108
109    //const video = document.getElementById("myVideoBg");
110    //video.play();
111    //video.addEventListener('ended', myHandler, false);
112    function myHandler(e) {
113        if (!e) { e = window.event; }
114        // e.target.setAttribute("loop", "");
115        // e.target.play();
116        $(".showcase-style-2 .slider-wrapper").slick('slickGoTo', 1);
117        $(".showcase-style-2 .slider-wrapper").slick("setOption", "autoplaySpeed", 3000);
118        // $(".showcase-style-2 .slider-wrapper").slick();
119
120        // alert("Video Finished");
121    }
122
123
124
125
126    $(".showcase-style-2 .slider-wrapper").on("beforeChange", function (
127        event,
128        slick,
129        currentSlide,
130        nextSlide
131    ) {
132        var currentSlideindex = nextSlide;
133        ++currentSlideindex;
134        $(".showcase-style-2 .indicator-style-2 .current").text(
135            check_number(currentSlideindex)
136        );
137
138
139
140
141        //if (currentSlideindex == 1) {
142        //    if (dvUniversite != null) {
143        //        dvUniversite.style.display = "block";
144        //    }
145        //    video.play();
146        //    // slick.options.autoplaySpeed = 100000;
147        //    $(".showcase-style-2 .slider-wrapper").slick("setOption", "autoplaySpeed", 100000);
148        //}
149        //else {
150        if (dvUniversite != null) {
151            dvUniversite.style.display = "none";
152        }
153
154        let toplam = parseInt(currentSlideindex) - 1;
155        let item = document.getElementById("slick-slide" + "0" + toplam)
156        item.style.display = "block";
157
158        //video.pause();
159        // slick.options.autoplaySpeed = 3000;
160        //  $(".showcase-style-2 .slider-wrapper").slick("setOption", "autoplaySpeed", 3000);
161
162        //}
163        //if (currentSlide == 0) {
164        //    $(".showcase-style-2 .slider-wrapper").slick("setOption", "autoplaySpeed", 3000);
165        //}
166    });
167
168    function totalSlideNum(totalSlide) {
169        $(".showcase-style-2 .indicator-style-2 .total").text(
170            check_number(totalSlide)
171        );
172    }
173
174    $(window).on("load", function () {
175        var totalSlide = $(".showcase-style-2 .slider-wrapper").slick("getSlick")
176            .slideCount;
177        totalSlideNum(totalSlide);
178
179        $(".showcase-style-2 .slider-wrapper").slick("slickPlay");
180        //$(".showcase-style-2 .slider-wrapper").slick({
181        //    dots: false,
182        //    infinite: true,
183        //    speed: 3000,
184        //    arrows: false,
185
186        //    cssEase: "linear",
187        //    prevArrow: $(".indicator-style-3 > .flaticon-up-arrow"),
188        //    nextArrow: $(".indicator-style-3 > .flaticon-down-arrow")
189        //});
190        $(".showcase-style-2 .slider-wrapper").slick("setOption", "autoplaySpeed", 3000);
191
192    });
193
194    function check_number(num) {
195        var IsInteger = /^[0-9]+$/.test(num);
196        return IsInteger ? (num < 10 ? "0" + num : "" + num) : null;
197    }
198}
199
200// ============================= Showcase Style 3 ==============================
201if ($(".showcase-style-3").length > 0) {
202    $(".showcase-style-3 .slider-wrapper").slick({
203        dots: false,
204        infinite: true,
205        speed: 500,
206        arrows: true,
207        dots: false,
208        cssEase: "linear",
209        prevArrow: $(".indicator-style-3 > .flaticon-up-arrow"),
210        nextArrow: $(".indicator-style-3 > .flaticon-down-arrow")
211    });
212
213    // On before home slider change
214    $(".slider-wrapper").on("beforeChange", function (
215        event,
216        slick,
217        currentSlide,
218        nextSlide
219    ) {
220        var totalSlide = slick.slideCount;
221        var currentSlideindex = nextSlide;
222        ++currentSlideindex;
223        var progress = 100 / totalSlide;
224        var progressHeight = progress * currentSlideindex;
225        SliderProgressbarStart(progressHeight);
226        $(".indicator-style-3 .current").text(check_number(currentSlideindex));
227    });
228
229    $(window).on("load", function () {
230        var totalSlide = $(".slider-wrapper").slick("getSlick").slideCount;
231        var progress = 100 / totalSlide;
232        var progressHeight = progress * 1;
233        SliderProgressbarStart(progressHeight);
234    });
235
236    function check_number(num) {
237        var IsInteger = /^[0-9]+$/.test(num);
238        return IsInteger ? "0" + num : null;
239    }
240
241    function SliderProgressbarStart(height) {
242        $(".home-slider-progressbar .home-slider-progress-active").css({
243            height: height + "%"
244        });
245    }
246}
247
248// ============================ Showcase Style 5 ===============================
249if ($(".showcase-style-5").length > 0) {
250    $(".slider-wrapper").slick({
251        infinite: true,
252        slidesToShow: 1,
253        slidesToScroll: 1,
254        dots: false,
255        autoplay: false,
256        speed: 1000,
257        autoplaySpeed: 5000,
258        fade: true,
259        prevArrow: $(".carousel-controlar > .prev"),
260        nextArrow: $(".carousel-controlar > .next"),
261        appendArrows: $(".showcase-style-5 .pagination-style-3")
262    });
263
264    $(".slider-wrapper").on("beforeChange", function (
265        event,
266        slick,
267        currentSlide,
268        nextSlide
269    ) {
270        var totalSlide = slick.slideCount;
271        var currentSlideindex = nextSlide;
272        ++currentSlideindex;
273        $(".showcase-style-5 .pagination-style-3 .current").text(
274            check_number(currentSlideindex)
275        );
276        $(".showcase-style-5 .pagination-style-3 .total").text(
277            check_number(totalSlide)
278        );
279    });
280
281    function totalSlideNum(totalSlide) {
282        $(".showcase-style-5 .pagination-style-3 .total").text(
283            check_number(totalSlide)
284        );
285    }
286
287    $(window).on("load", function () {
288        var totalSlide = $(".slider-wrapper").slick("getSlick").slideCount;
289        totalSlideNum(totalSlide);
290    });
291
292    function check_number(num) {
293        var IsInteger = /^[0-9]+$/.test(num);
294        return IsInteger ? "0" + num : null;
295    }
296}
297
298/* =======================================================================
299                          Testimonial Slider
300 ======================================================================= */
301// testimonial Slider
302if ($(".testimonial-style-1").length > 0) {
303    //thumb slider
304    $(".testimonial-thumbnail-slider").slick({
305        slidesToShow: 4,
306        slidesToScroll: 1,
307        asNavFor: ".testimonial-description-slider",
308        dots: true,
309        centerMode: true,
310        focusOnSelect: true,
311        prevArrow: '<span class="slick-prev"><i class="flaticon-back"></i></span>',
312        nextArrow: '<span class="slick-next"><i class="flaticon-next"></i></span>',
313        appendArrows: $(".testimonial-slider-arrows"),
314        appendDots: $(".testimonial-slider-dots"),
315        responsive: [
316            {
317                breakpoint: 420,
318                settings: {
319                    slidesToShow: 2,
320                    slidesToScroll: 1,
321                    arrows: false
322                }
323            }
324        ]
325    });
326    //description slider
327    $(".testimonial-description-slider").slick({
328        slidesToShow: 1,
329        slidesToScroll: 1,
330        arrows: false,
331        fade: true,
332        dots: false,
333        asNavFor: ".testimonial-thumbnail-slider"
334    });
335
336    $(
337        '.testimonial-carousel-wrap .testimonial-thumbnail-slider .single-testimonial-thumb[data-slick-index="2"]'
338    ).addClass("testimonial-center-item");
339}
340
341// Testimonial Slider -> Homepage 4
342if ($(".testimonial-style-2").length > 0) {
343    //thumb slider
344    $(".testimonial-thumbnail-slider").slick({
345        slidesToShow: 4,
346        slidesToScroll: 1,
347        asNavFor: ".testimonial-description-slider",
348        dots: true,
349        arrows: false,
350        centerMode: true,
351        focusOnSelect: true,
352        appendDots: $(".testimonial-style-2 .slider-indicator-2"),
353        responsive: [
354            {
355                breakpoint: 420,
356                settings: {
357                    slidesToShow: 2,
358                    slidesToScroll: 1,
359                    arrows: false
360                }
361            }
362        ]
363    });
364    //description slider
365    $(".testimonial-description-slider").slick({
366        slidesToShow: 1,
367        slidesToScroll: 1,
368        arrows: false,
369        fade: true,
370        dots: false,
371        asNavFor: ".testimonial-thumbnail-slider"
372    });
373
374    $(".testimonial-thumbnail-slider").on("beforeChange", function (
375        event,
376        slick,
377        currentSlide,
378        nextSlide
379    ) {
380        var totalSlide = slick.slideCount;
381        var currentSlideindex = nextSlide;
382        ++currentSlideindex;
383        $(".testimonial-style-2 .slider-indicator-3 .current").text(
384            check_number(currentSlideindex)
385        );
386        $(".testimonial-style-2 .slider-indicator-3 .total").text(
387            check_number(totalSlide)
388        );
389    });
390
391    function totalSlideNum(totalSlide) {
392        $(".testimonial-style-2 .slider-indicator-3 .total").text(
393            check_number(totalSlide)
394        );
395    }
396
397    $(window).on("load", function () {
398        var totalSlide = $(".testimonial-thumbnail-slider").slick("getSlick")
399            .slideCount;
400        totalSlideNum(totalSlide);
401    });
402
403    function check_number(num) {
404        var IsInteger = /^[0-9]+$/.test(num);
405        return IsInteger ? "0" + num : null;
406    }
407}
408
409// Testimonial Slider 3 -> Online Courses
410if ($(".testimonials-style-3").length > 0) {
411    $(".testimonial-slider-wrapper").slick({
412        slidesToShow: 1,
413        slidesToScroll: 1,
414        dots: true,
415        arrows: true,
416        centerMode: true,
417        focusOnSelect: true,
418        appendDots: $(".testimonial-style-2 .slider-indicator-2"),
419        nextArrow: $(".testimonials-style-3 .carousel-controlar .next"),
420        prevArrow: $(".testimonials-style-3 .carousel-controlar .prev"),
421        responsive: [
422            {
423                breakpoint: 420,
424                settings: {
425                    slidesToShow: 1,
426                    slidesToScroll: 1,
427                    arrows: false
428                }
429            }
430        ]
431    });
432
433    $(".testimonial-slider-wrapper").on("beforeChange", function (
434        event,
435        slick,
436        currentSlide,
437        nextSlide
438    ) {
439        var totalSlide = slick.slideCount;
440        var currentSlideindex = nextSlide;
441        ++currentSlideindex;
442        $(".testimonials-style-3 .pagination-style-3 .current").text(
443            check_number(currentSlideindex)
444        );
445        $(".testimonials-style-3 .pagination-style-3 .total").text(
446            check_number(totalSlide)
447        );
448    });
449
450    function totalSlideNum(totalSlide) {
451        $(".testimonials-style-3 .pagination-style-3 .total").text(
452            check_number(totalSlide)
453        );
454    }
455
456    $(window).on("load", function () {
457        var totalSlide = $(".testimonial-slider-wrapper").slick("getSlick")
458            .slideCount;
459        totalSlideNum(totalSlide);
460    });
461
462    function check_number(num) {
463        var IsInteger = /^[0-9]+$/.test(num);
464        return IsInteger ? "0" + num : null;
465    }
466}
467
468/*===============================================================================
469                              Blogs Slider
470================================================================================*/
471
472// blog slider style 1
473if ($(".blog-carousel-01").length > 0) {
474    $(".blog-carousel-01").owlCarousel({
475        nav: true,
476        dots: true,
477        navText: ['<i class="flaticon-back"></i>', '<i class="flaticon-next"></i>'],
478        margin: 30,
479        loop: true,
480        dots: true,
481        navContainer: $(".blog-carousel-controls"),
482        dotsContainer: $(".blog-carousel-controls .dots"),
483        responsive: {
484            0: {
485                items: 1,
486                // dots: false,
487                nav: false
488            },
489            460: {
490                items: 1,
491                // dots: false,
492                nav: false
493            },
494            599: {
495                items: 1,
496                // dots: false,
497                nav: false
498            },
499            768: {
500                items: 1
501            },
502            960: {
503                items: 2
504            },
505            1200: {
506                items: 2
507            },
508            1920: {
509                items: 2
510            }
511        }
512    });
513}
514
515// blog slider style 2
516if ($(".blog-carousel-2").length > 0) {
517    $(".blog-carousel-2").owlCarousel({
518        nav: true,
519        dots: true,
520        navText: [$(".carousel-icon > .prev"), $(".carousel-icon > .next")],
521        margin: 30,
522        loop: true,
523        dots: true,
524        navContainer: $(".blog-carousel-controls"),
525        dotsContainer: $(".blog-carousel-controls .dots"),
526        responsive: {
527            0: {
528                items: 1,
529                // dots: false,
530                nav: false
531            },
532            460: {
533                items: 1,
534                // dots: false,
535                nav: false
536            },
537            599: {
538                items: 1,
539                // dots: false,
540                nav: false
541            },
542            768: {
543                items: 1
544            },
545            960: {
546                items: 2
547            },
548            1200: {
549                items: 2
550            },
551            1920: {
552                items: 2
553            }
554        }
555    });
556}
557
558// blog slider styl3 3
559if ($(".blogs-style-3").length > 0) {
560    $(".blogs-style-3").slick({
561        slidesToShow: 2,
562        slidesToScroll: 1,
563        dots: true,
564        arrows: false,
565        appendDots: $(".blogs-section-2 .slider-indicator-2"),
566        responsive: [
567            {
568                breakpoint: 768,
569                settings: {
570                    slidesToShow: 1,
571                    slidesToScroll: 1,
572                    arrows: false
573                }
574            }
575        ]
576    });
577
578    $(".blogs-style-3").on("beforeChange", function (
579        event,
580        slick,
581        currentSlide,
582        nextSlide
583    ) {
584        var currentSlideindex = nextSlide;
585        ++currentSlideindex;
586        $(".blogs-section-2 .slider-indicator-3 .current").text(
587            check_number(currentSlideindex)
588        );
589    });
590
591    function totalSlideNum(totalSlide) {
592        $(".blogs-section-2 .slider-indicator-3 .total").text(
593            check_number(totalSlide)
594        );
595    }
596
597    $(window).on("load", function () {
598        var totalSlide = $(".blogs-style-3").slick("getSlick").slideCount;
599        totalSlideNum(totalSlide);
600    });
601
602    function check_number(num) {
603        var IsInteger = /^[0-9]+$/.test(num);
604        return IsInteger ? "0" + num : null;
605    }
606}
607
608// Teachers Carousel
609if ($(".teachers-carousel").length > 0) {
610    $(".teachers-carousel").owlCarousel({
611        nav: true,
612        dots: true,
613        navText: ['<i class="flaticon-back"></i>', '<i class="flaticon-next"></i>'],
614        margin: 30,
615        loop: true,
616        dots: true,
617        dotsContainer: $(".teacher-carousel-controls .dots"),
618        responsive: {
619            0: {
620                items: 1,
621                // dots: false,
622                nav: false
623            },
624            460: {
625                items: 1,
626                // dots: false,
627                nav: false
628            },
629            599: {
630                items: 1,
631                // dots: false,
632                nav: false
633            },
634            768: {
635                items: 1
636            },
637            960: {
638                items: 2
639            },
640            1200: {
641                items: 3
642            },
643            1920: {
644                items: 3
645            }
646        }
647    });
648
649    $(document).on("click", ".single-teacher-item .thumb .hover .plus", function (
650        e
651    ) {
652        e.preventDefault();
653        const el = $(this);
654        el.parent().toggleClass("active");
655    });
656}
657
658// single range slider with default tooltip open
659if ($(".range-slider-con").length > 0) {
660    var pmdSliderTooltip = document.getElementById("pmd-slider");
661    noUiSlider.create(pmdSliderTooltip, {
662        start: [1],
663        connect: "lower",
664        tooltips: [wNumb({ decimals: 0 })],
665        range: {
666            min: [1],
667            max: [8]
668        }
669    });
670}

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.