PageSourceSearch

https://www.stadthalle.com/_assets/js/slidenav.js?version=2026-10-02_10:20:59

js stadthalle.com collected 2026-10-02 10:05:03 UTC 3,983 bytes, 196 lines download raw bytes

1slideNav = function(){
2	var html,
3	content,
4	smartphone = false,
5	swipeLoad = true,
6	navstat = false,
7	reactonswipe = true,
8	h = document.documentElement,
9	startonce = false,
10	scrollOffset=0;
11	function initialize(){
12		if(startonce) {return false;}
13		
14		html = $("html");
15		content = $('#content');
16		startonce = true;
17		
18		initNav();
19	}
20	function initNav(){
21
22				
23		$("#navanchor").on("click", function(e) {
24			e.preventDefault();	
25				
26            if($('nav#navwrap').length){
27                if(!navstat){			
28                    openSlideNav();			
29                } else {
30                    closeSlideNav();	
31                }
32
33                $(this).blur();
34            }
35		});	
36		$("#closenavanchor").on("click", function(e) {
37			e.preventDefault();	
38					
39            if($('nav#navwrap').length){
40			if(!navstat){			
41				openSlideNav();			
42			} else {
43				closeSlideNav();	
44			}
45			
46			$(this).blur();
47            }
48		});
49		
50		
51		if($(".sidenav .open").length > 0){
52			$('.slidenav-inner').animate({
53				scrollTop: $(".sidenav .open").offset().top
54			}, 1500);	
55		}
56		
57		$("#parentoverlay").on("click", function(e) {
58			e.preventDefault();	
59		
60			if(navstat){			
61				closeSlideNav();
62			}
63			
64		});		
65
66		$("#slidenav-right").on("click", function(e) {
67			e.preventDefault();	
68		
69			if(navstat){			
70				closeSlideNav();
71			}
72			
73		});		
74
75				
76		$("#slidenav .plus").on("click", function(e) {
77			
78			e.preventDefault();	
79			
80			var itemclass = $(this).attr("data-item");
81			
82			var par = $(this).parent("li");
83			var subnav = par.find("ul.subnav");
84			
85			if(par.hasClass('open')) {
86				$(this).removeClass('popen');
87				//subnav.slideUp("slow");
88				par.removeClass('open');
89			} else {
90				
91				$(this).addClass('popen');
92			//	subnav.slideDown("slow",function(){
93			//		$('.slidenav-inner').animate({
94			//			scrollTop: $('.'+itemclass).offset().top -100
95			//		}, 1500);
96			//	});
97				par.addClass('open');	
98			}	
99			
100		});
101				
102		/*if($("body").hasClass("ismobile")){
103		
104			$("#parentwrapper").swipe( {
105				swipeStatus:function(event, phase, direction, distance)
106				{				
107					if(reactonswipe && distance > 100){			
108	
109						if (phase=="end" && direction=="left" && navstat){	
110																	
111							closeSlideNav();
112							
113						}
114						if (phase=="end" && direction=="right" && !navstat){			
115										
116							openSlideNav();
117							
118						}
119					}
120				},
121				triggerOnTouchEnd:true,
122				allowPageScroll:"vertical",
123				threshold:100
124			});
125		}*/
126	
127	
128	$('#slidenav *')
129    .focus(function() {
130        $('#slidenav').addClass('focus');
131    })
132    .blur(function() {
133        $('#slidenav').removeClass('focus');
134    });
135		
136		
137
138	}	
139	
140	function openSlideNav(){
141		if($("html").hasClass('scrollheader')){
142			$("html").addClass("scrollheadernav");
143		}
144		scrollOffset=$(window).scrollTop();
145
146		$("html").toggleClass("navactive");
147		$('#content').animate({
148				marginTop: -scrollOffset
149			}, 0);	
150				
151		if (Modernizr.csstransforms && Modernizr.csstransitions && Modernizr.csstransforms3d) {
152		
153			navstat = true;
154		
155		} else {
156		
157			reactonswipe=false;
158			
159			//$("#header").css("position","fixed");
160
161			navstat = true;reactonswipe=true;
162			
163			$("#parentoverlay").fadeToggle(700, "linear" );
164		
165		}	
166	}
167	function closeSlideNav(){
168		$("html").toggleClass("navactive");
169		$('#content').animate({
170				marginTop: 0
171			}, 0);	
172		$(window).scrollTop(scrollOffset);	
173		if (Modernizr.csstransforms && Modernizr.csstransitions && Modernizr.csstransforms3d) {
174		
175			navstat = false;
176		
177		} else {
178		
179			reactonswipe=false;
180			
181			$("#parentoverlay").fadeToggle(700, "linear");
182				navstat = false;
183				reactonswipe=true;	  
184		}
185
186		$('#slidenav').removeClass('focus');
187		$("html").removeClass("scrollheadernav");
188	}
189	return{
190		start:initialize
191	}
192	
193}();	
194$(function(){
195	slideNav.start();
196});

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.