PageSourceSearch

https://uhz-online.de/_js/wirsinds_bootstrap5.js

js uhz-online.de collected 2026-10-05 17:57:21 UTC 5,929 bytes, 204 lines download raw bytes

1$(function () {
2	// --- PAGETOP --- //
3			$(document).ready(function(){
4			     $(window).scroll(function () {
5			            if ($(this).scrollTop() > 50) {
6			                $('.pagetop-scroll').fadeIn();
7			            } else {
8			                $('.pagetop-scroll').fadeOut();
9			            }
10			        });
11			        // scroll body to 0px on click
12			        $('.pagetop-scroll').click(function () {
13			            //$('.pagetop-scroll').tooltip('hide');
14			            $('body,html').animate({
15			                scrollTop: 0
16			            }, 800);
17			            return false;
18			        });
19			        //$('.pagetop-scroll').tooltip('show');
20			});
21			
22			
23			
24	// --- STICKY-NAV-SCROLL --- //
25			$(document).scroll(function () {
26			    var $nav = $(".navbar");
27			    $nav.toggleClass('scrolled', $(this).scrollTop() > $nav.height());
28			});
29			
30			
31			
32	// --- STICKY --- //
33			$(document).scroll(function () {
34			    var $sticky = $(".sticky");
35			    $sticky.toggleClass('scrolled', $(this).scrollTop() > $sticky.height());
36			});
37			
38	// --- SCROLLING für irgendein Element mit der hinzugefügten Klasse '.scrolling' --- //
39			 $(document).scroll(function () {
40			    var $scrolling = $(".scrolling");
41			    $scrolling.toggleClass('scrolled', $(this).scrollTop() > $scrolling.height());
42			});	
43        
44        
45    // Add class to body mit Class 'bodyscroll' when scrolling
46			var targetDiv = $('.bodyscroll');
47			$(window).scroll(function() {
48				var windowpos = $(window).scrollTop();
49				if( windowpos >= 50 ) {
50			        targetDiv.addClass('scrolled');
51			    	} 
52			    else {
53			        targetDiv.removeClass('scrolled');
54			    	}
55			});
56	// Add class to body mit Class 'anchor-top' when scrolling
57			var targetDiv = $('.anchor-top');
58			$(window).scroll(function() {
59				var windowpos = $(window).scrollTop();
60				if( windowpos >= 50 ) {
61			        targetDiv.addClass('scrolled');
62			    	} 
63			    else {
64			        targetDiv.removeClass('scrolled');
65			    	}
66			});	
67	// Add class to body when scrolling
68			/*var targetDiv = $('body');
69			$(window).scroll(function() {
70				var windowpos = $(window).scrollTop();
71				if( windowpos >= 50 ) {
72			        targetDiv.addClass('scrolled');
73			    	} 
74			    else {
75			        targetDiv.removeClass('scrolled');
76			    	}
77			});	 */  	
78			
79			
80			
81			
82	
83	
84	// HIDE MENU ON SCROLL down
85			var didScroll;
86			var lastScrollTop = 100;
87			var delta = 5;
88			var navbarHeight = $('header').outerHeight();
89			
90			$(window).scroll(function(event){
91			    didScroll = true;
92			});
93			setInterval(function() {
94			    if (didScroll) {
95			        hasScrolled();
96			        didScroll = false;
97			    }
98			}, 100);
99			
100			function hasScrolled() {
101			    var st = $(this).scrollTop();
102			    // Make sure they scroll more than delta
103			    if(Math.abs(lastScrollTop - st) <= delta)
104			        return;
105			     // If they scrolled down and are past the navbar, add class .hide-on-scroll-up.
106			    // This is necessary so you never see what is "behind" the header.
107			    if (st > lastScrollTop && st > navbarHeight){
108			        // Scroll Down
109			        $('header').removeClass('').addClass('scroll-disappear');
110			    } else {
111			        // Scroll Up
112			        if(st + $(window).height() < $(document).height()) {
113			        $('header').removeClass('scroll-disappear').addClass('scroll-top');
114			        }
115			    }
116			    lastScrollTop = st;
117			}
118			$(window).scroll(function(){
119			    if ($(this).scrollTop() > 0) {
120			       $('header').addClass('scroll-show');
121			    } else {
122			       $('header').removeClass('scroll-show');
123			    }
124			});
125						  
126			        
127});	
128
129
130
131///////////////////////////////////////////////////////////////////////////////////////////////
132// -------- Springt beim Scrollen zum Anchor, ohne unter der Sticky-Nav zu liegen --------- //
133/////////////////////////////////////////////////////////////////////////////////////////////
134/*
135function scrollToAnchor(hash) {
136	var target = $(hash),
137        headerHeight = $(".navbar").height() + 120; // Sprunghöhe
138        
139    target = target.length ? target : $('[name=' + hash.slice(1) +']');
140
141    if (target.length)
142    {
143        $('html,body').animate({
144            scrollTop: target.offset().top - headerHeight
145        }, 1000);
146        return false;
147    }
148}
149
150
151if(window.location.hash) {
152	    scrollToAnchor(window.location.hash);
153	}
154
155$("a[href*=\\#]:not([href=\\#])").click(function() {
156    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
157        || location.hostname == this.hostname)
158    {
159
160        scrollToAnchor(this.hash);
161    }
162});
163*/
164
165
166
167
168
169///////////////////////////////////////////////////////////////////////////////////////////////
170// -------- SEARCH --------- //
171/////////////////////////////////////////////////////////////////////////////////////////////
172$(document).ready(function() {
173   $(".box-search > .form-control").click(function() {
174        if ($(".box-search").hasClass("open")) {
175            $(".box-search").removeClass("open"); 
176        } else {
177            $(".box-search").addClass("open"); 
178        }
179    });
180});
181
182
183
184
185
186
187///////////////////////////////////////////////////////////////////////////////////////////////
188// -------- Accordion --------- //
189/////////////////////////////////////////////////////////////////////////////////////////////
190var acc = document.getElementsByClassName("accordion");
191var i;
192
193for (i = 0; i < acc.length; i++) {
194  acc[i].addEventListener("click", function() {
195    this.classList.toggle("accordion-active");
196    var panel = this.nextElementSibling;
197    if (panel.style.maxHeight){
198      panel.style.maxHeight = null;
199    } 
200    else {
201      panel.style.maxHeight = panel.scrollHeight + "px";
202    } 
203  });
204}

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.