PageSourceSearch

https://www.museevisionnaire.ch/wp-content/themes/adios-child/script.js?ver=7.0.6

js museevisionnaire.ch collected 2026-09-26 07:04:54 UTC 4,133 bytes, 160 lines download raw bytes

1document.addEventListener("DOMContentLoaded", function() {
2
3
4//Burger-Menu Droplink
5var $droplinks = $('.drop-link');
6if ($droplinks.length) {
7 $droplinks.each(function() {
8  var $dropmenu = $(this).siblings('.drop-menu').first();
9  $(this).on('click', function() {
10   event.preventDefault();
11   $dropmenu.css('display', 'block');
12  });
13 });
14}
15
16//Burger-Menu Droplink für Subelement "Streetart" (Muss für weitere Submenus kopiert werden, wenn mehrere Submenus, dann muss Code von oben übernommen werden damit, sich beim Click nicht alle klassen öffenen, also der Array muss abgefangen werden)	
17
18$('a:contains("Streetart")').addClass('drop-link-sub'); //Hier muss spezifisch das Element adressiert werden
19$('a:contains("Highlights + News")').addClass('drop-link-sub'); //Hier muss spezifisch das Element adressiert werden
20var $droplinkssub = $('.drop-link-sub');
21$droplinkssub.on('click', function() {
22	event.preventDefault();
23	$(this).toggleClass('drop-link-sub-active');
24	$(this).siblings('.drop-menu-next').toggle();
25});
26
27
28	
29	
30var $droplink = $('.drop-link');
31$droplink.on('click', function() {
32	
33	var $dropmenu = $(this).siblings('.drop-menu');
34	if ($dropmenu.hasClass('drop-menu-active')) {
35		$dropmenu.hide();
36		$('.drop-menu-next').hide();
37		$(this).removeClass('drop-link-active');
38		$dropmenu.removeClass('drop-menu-active');
39	} else {
40		$(this).addClass('drop-link-active');
41		$dropmenu.addClass('drop-menu-active');
42	}
43});
44	
45var $burgermenuactive = $('.burger-menu');
46$burgermenuactive.on('click', function() {
47	if (!$burgermenuactive.hasClass('active')) {
48		$dropmenu = $('.drop-menu');
49		$dropmenu.hide();
50		$dropmenu.removeClass('drop-menu-active');
51		$('.drop-link').removeClass('drop-link-active');
52		$('.drop-menu-next').hide();
53		$('.drop-link-sub').removeClass('drop-link-sub-active');
54	} 
55});
56	
57	
58	
59
60	
61//Toggle Fixed Button
62
63
64/*
65
66function toggleButton() {
67  let img = document.getElementById("btn-fixed");
68  img.src = img.src == "/wp-content/uploads/spenden-btn.png" ? "/test" : "/wp-content/uploads/spenden-btn.png";
69}
70	
71setInterval(toggleButton, 1000);
72	*/
73
74
75	
76
77//Agenda
78
79$('.begleitprogramm-filter').click(function(){
80 $('.workshop').css('display', 'none');
81 $('.fuehrung').css('display', 'none');
82 $('.begleitprogramm').css('display', '');
83});
84
85$('.workshop-filter').click(function(){
86 $('.begleitprogramm').css('display', 'none');
87 $('.fuehrung').css('display', 'none');
88 $('.workshop').css('display', '');
89});
90
91$('.fuehrung-filter').click(function(){
92 $('.begleitprogramm').css('display', 'none');
93 $('.workshop').css('display', 'none');
94 $('.fuehrung').css('display', '');
95});
96
97$('.alle-filter').click(function(){
98 $('.workshop').css('display', '');
99 $('.begleitprogramm').css('display', '');
100 $('.fuehrung').css('display', '');
101});
102
103$('.agenda-title h4').click(function(){
104  if($(this).parents(".agenda-title").siblings(".agenda-content").is(':hidden')){
105      $('.agenda-content, .agenda-arrow').hide();
106  }
107 $(this).parents(".agenda-title").siblings(".agenda-content, .agenda-arrow").toggle();
108});
109
110$('.agenda-arrow').click(function(){
111 $(this).siblings(".agenda-content").toggle();
112 $(this).toggle();
113});
114
115$('.agenda-filter a').click(function(){
116 $(".agenda-content, .agenda-arrow").hide();
117});
118
119
120// Ausblenden von vergangen Daten
121
122var currentDate = new Date();
123currentDate.setDate( currentDate.getDate() - 1);
124console.log(currentDate);
125var dateArray = document.getElementsByClassName("agenda-datum");
126
127
128    for(var i = (dateArray.length - 1); i >= 0; i--)
129    {
130
131      var dateRaw = dateArray[i].innerHTML;
132      var parts = dateRaw.split('.');
133      var dateFormat = new Date(parts[2], parts[1]-1, parts[0]);
134      console.log(dateFormat);
135
136        if(dateFormat < currentDate){
137
138          dateArray[i].closest(".agendaeintrag").classList.add("agenda-invisible");
139       }
140
141    }
142
143$('a[href^="#"]').not('.tab a').on('click',function(e) {
144 e.preventDefault();
145 var target = this.hash;
146 var $target = $(target);
147if ($target.length) {
148
149 $('html, body').stop().animate({
150  'scrollTop': $target.offset().top
151 }, 900, 'swing', function () {
152  window.location.hash = target;
153 });
154}
155});
156	
157	
158
159//EndDOM
160});

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.