PageSourceSearch

https://www.lch.ch/typo3temp/assets/compressed/owl.init-e5176888c85c5d1f22b285465230e528.js?1790756694

js lch.ch collected 2026-10-02 04:28:10 UTC 3,813 bytes, 114 lines download raw bytes

1jQuery(document).ready(function ($) {
2    'use strict';
3
4    var owlContainer = $('.hf-slider');
5
6    /* OWL Seiten Default Settings */
7    var OWLDefaultSettings;
8    OWLDefaultSettings = {
9        autoplay: true,
10        autoplayHoverPause: true,
11        autoWidth: true, /* ACHTUNG: Für autoWith sollte eine Height gesetzt sein! */
12        loop: true,
13        items: 1,
14        nav: false,
15        navText: [
16            "<div class='icon icon-ArrowLeft'><span></span></div>",
17            "<div class='icon icon-ArrowRight'><span></span></div>"
18        ],
19        animateOut: "fadeOut"
20    };
21
22    var countOfOwlSliderPerPage = 1;
23    owlContainer.each(function () {
24        var $carousel = $(this);
25        if ($(this).children('div, img, picture').length > 1) {
26            if (!$(this).attr('id')) {
27                $(this).attr('id', "owlSlider" + countOfOwlSliderPerPage);
28                countOfOwlSliderPerPage++;
29            }
30
31            /* Lade Default Settings */
32            var owlSettings = OWLDefaultSettings;
33
34            /* TODO: In Funktion auslagern ... */
35            owlSettings.autoplay = ($(this).attr("data-autoplay") == 1);
36
37            if (parseInt($(this).attr("data-items"))) {
38                owlSettings.items = parseInt($(this).attr("data-items"));
39            }
40
41            owlSettings.autoWidth = ($(this).attr("data-autowidth") == 1);
42
43            if ($(this).attr("data-loop")) {
44                owlSettings.loop = ($(this).attr("data-loop") == 1);
45            }
46
47            if ($(this).attr("data-center")) {
48                owlSettings.center = ($(this).attr("data-center") == 1);
49            }
50
51            if ($(this).attr("data-animate")) {
52                if($(this).attr("data-animate") == "false") {
53                    owlSettings.animateOut = '';
54                }
55                else {
56                    owlSettings.animateOut = $(this).attr("data-animate");
57                }
58            }
59
60            owlSettings.dots = ($(this).attr("data-dots") == 1);
61
62            if ($(this).attr("data-responsive")) {
63                owlSettings.responsive = JSON.parse($(this).attr("data-responsive"));
64            }
65
66            owlSettings.nav = ($(this).attr("data-nav") == 1);
67
68            if ($(this).attr("data-autoplayHoverPause")) {
69                owlSettings.autoplayHoverPause = ($(this).attr("data-autoplayHoverPause") == 1);
70            }
71
72            if (parseInt($(this).attr("data-autoplayTimeout"))) {
73                owlSettings.autoplayTimeout = parseInt($(this).attr("data-autoplayTimeout")) * 1000;
74            }
75
76            if (parseInt($(this).attr("data-random")) == 1) {
77                random($(this));
78            }
79
80            var $sliderJumps = $carousel.parent().find('.hf-slider-jump');
81
82            if ($sliderJumps.length) {
83                $carousel.on('changed.owl.carousel', function (event) {
84                    var instance = $carousel.data('owlCarousel');
85                    var index = instance == null ? event.item.index : instance.relative(event.item.index);
86
87                    $sliderJumps.removeClass('active');
88                    $sliderJumps.eq(index).addClass('active');
89                });
90
91                $sliderJumps.each(function (index) {
92                    var $this = $(this);
93                    $this.hover(function () {
94                        $carousel.trigger('to.owl.carousel', [ index , 0, true ]);
95                    });
96                });
97            }
98
99            /* Initialisiere OWL */
100            $(this).owlCarousel(owlSettings);
101
102        }
103
104    });
105
106    function random (owlSelector) {
107        owlSelector.children().sort(function () {
108            return Math.round(Math.random()) - 0.5;
109        }).each(function () {
110            $(this).appendTo(owlSelector);
111        });
112    }
113
114});

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.