PageSourceSearch

https://www.forum-bodelshausen.de/site/Bodelshausen-Forum/resourceCached/24.2.0.1/js/functions.js

js forum-bodelshausen.de collected 2026-10-08 12:10:29 UTC 8,265 bytes, 245 lines download raw bytes

1/* --------------------------
2Klasse in Body bei Kontrastumschaltung
3-------------------------- */
4	    jQuery(document).ready(function() {
5        jQuery(".slidemenu").click(function() {
6            jQuery(".slidemenu + ul").toggleClass("invisible");
7        });
8    });
9
10
11
12/* --------------------------
13    MMenu Einbindung
14-------------------------- */
15
16document.addEventListener("DOMContentLoaded", function (event) {
17    new Mmenu("#mobileNav", {
18
19      //options
20      extensions: ["position-right", "pagedim-black", "shadow-page", "theme-white", "border-full", "listview-justify"],
21      setSelected: true,
22
23      "navbars": [{
24          "position": "top",
25          "content": ["<a href='/startseite'><img class='mm-logo' src='/site/Bodelshausen-Forum/resourceCached/10.0.8/img/logo.png' /></a>"],
26        },
27        {
28          "position": "bottom",
29          "content": ['<div id=\'mmenu-search\' class=\'mmenu-search\'><form action=\'/site/Bodelshausen-Forum/search/16248582/Lde/index.html\' class=\'quicksearch noprint\' method=\'GET\'><input  type=\'search\' name=\'query\' id=\'qs_query\' class=\'quicksearchtext\' value=\'Suchbegriff(e)\' onFocus=\'if(this.value == this.defaultValue){this.value = \x22 \x22;}\'><input class=\'quicksearchimg\' type=\'image\' src=\'/site/Bodelshausen-Forum/resourceCached/10.0.3/img/lupe.png\' alt=\'Suche\'></form></div>']
30        }
31      ]
32
33
34    }, {
35      classNames: {
36        selected: "current" //Change this class to match the default li you want
37    },
38      // configuration
39      offCanvas: {
40        clone: false,
41        pageNodetype: "mm-wrap",
42        classNames: {
43          selected: 'current'
44        }
45      }
46    });
47  }
48
49);
50
51jQuery(document).ready(function () {
52const panel = document.querySelector( "#mobileNav" );
53const listview = panel.querySelector( ".mm-listview" );
54
55const listitemImpressum = document.createElement( "li" );
56listitemImpressum.className = "mm-listitem secondlist";
57listitemImpressum.innerHTML = '<a class="mm-listitem__text" href="http://www.forum-bodelshausen.de/impressum">Impressum</a>';
58listview.append( listitemImpressum );
59
60const listitemDatenschutz = document.createElement( "li" );
61listitemDatenschutz.className = "mm-listitem secondlist";
62listitemDatenschutz.innerHTML = '<a class="mm-listitem__text" href="http://www.forum-bodelshausen.de/datenschutz">Datenschutz</a>';
63listview.append( listitemDatenschutz );
64
65const listitemBarrierefreiheit = document.createElement( "li" );
66listitemBarrierefreiheit.className = "mm-listitem secondlist";
67listitemBarrierefreiheit.innerHTML = '<a class="mm-listitem__text" href="http://www.forum-bodelshausen.de/barrierefreiheit">Barrierefreiheit</a>';
68listview.append( listitemBarrierefreiheit );
69
70const listitemLeichteSprache = document.createElement( "li" );
71listitemLeichteSprache.className = "mm-listitem secondlist";
72listitemLeichteSprache.innerHTML = '<a class="mm-listitem__text" href="http://www.forum-bodelshausen.de/startseite/leichte+sprache">Leichte Sprache</a>';
73listview.append( listitemLeichteSprache );
74
75//api.initListview( listview );
76});
77
78
79/* --------------------------
80    Barrierefreier Hamburger Icon
81-------------------------- */
82
83jQuery(document).ready(function () {
84  var $mmbutton = jQuery('#mburger');
85  var isMenuOpen = false;
86
87  $mmbutton.on('click', function () {
88    isMenuOpen = !isMenuOpen;
89
90    $mmbutton.attr('aria-expanded', isMenuOpen);
91  });
92
93});
94
95
96
97
98// SCROLL BACK TO TOP BUTTON
99jQuery(document).ready(function($) {
100  // browser window scroll (in pixels) after which the "back to top" link is shown
101  var offset = 300,
102    //browser window scroll (in pixels) after which the "back to top" link opacity is reduced
103    offset_opacity = 1200,
104    //duration of the top scrolling animation (in ms)
105    scroll_top_duration = 700,
106    //grab the "back to top" link
107    $back_to_top = $('.cd-top');
108
109  //hide or show the "back to top" link
110  $(window).scroll(function() {
111    ($(this).scrollTop() > offset) ? $back_to_top.addClass('cd-is-visible'): $back_to_top.removeClass('cd-is-visible cd-fade-out');
112    if ($(this).scrollTop() >
112 offset_opacity) {
113      $back_to_top.addClass('cd-fade-out');
114    }
115  });
116
117  //smooth scroll to top
118  $back_to_top.on('click', function(event) {
119    event.preventDefault();
120    $('body,html').animate({
121      scrollTop: 0,
122    }, scroll_top_duration);
123  });
124
125});
126
127
128
129
130
131// ****************** Fixed Header ***********************
132jQuery(document).ready(function($) {
133
134  // Resize Header on Scroll
135  function resizeHeaderOnScroll() {
136    const distanceY = window.pageYOffset || document.documentElement.scrollTop;
137    var shrinkOn = 200;
138    var headerEl = $('#js-header');
139
140    if (distanceY > shrinkOn) {
141      headerEl.addClass("smaller");
142    } else {
143      headerEl.removeClass("smaller");
144    }
145  }
146
147  window.addEventListener('scroll', resizeHeaderOnScroll);
148})
149
150
151/*
152 * Supposition v0.3a - an optional enhancer for Superfish jQuery menu widget
153 *
154 * Copyright (c) 2013 Joel Birch - based on work by Jesse Klaasse - credit goes largely to him.
155 * Special thanks to Karl Swedberg for valuable input.
156 *
157 * Dual licensed under the MIT and GPL licenses:
158 *   http://www.opensource.org/licenses/mit-license.php
159 * 	http://www.gnu.org/licenses/gpl.html
160 */
161jQuery(document).ready(function($) {
162;(function($){
163
164	$.fn.supposition = function(){
165		var $w = $(window), /*do this once instead of every onBeforeShow call*/
166			_offset = function(dir) {
167				return window[dir == 'y' ? 'pageYOffset' : 'pageXOffset']
168				|| document.documentElement && document.documentElement[dir=='y' ? 'scrollTop' : 'scrollLeft']
169			    || document.body[dir=='y' ? 'scrollTop' : 'scrollLeft'];
170			},
171			onInit = function(){
172				/* I haven't touched this bit - needs work as there are still z-index issues */
173				$topNav = $('li',this);
174				var cZ=parseInt($topNav.css('z-index')) + $topNav.length;
175				$topNav.each(function() {
176					$(this).css({zIndex:--cZ});
177				});
178			},
179			onHide = function(){
180				this.css({marginTop:'',marginLeft:''});
181			},
182			onBeforeShow = function(){
183				this.each(function(){
184					var $u = $(this);
185					$u.css('display','block');
186					var menuWidth = $u.width(),
187						parentWidth = $u.parents('ul').width(),
188						totalRight = $w.width() + _offset('x'),
189						menuRight = $u.offset().left + menuWidth;
190					if (menuRight > totalRight) {
191						$u.css('margin-left', ($u.parents('ul').length == 1 ? totalRight - menuRight : -(menuWidth + parentWidth)) + 'px');
192					}
193
194					var windowHeight = $w.height(),
195						offsetTop = $u.offset().top,
196						menuHeight = $u.height(),
197						baseline = windowHeight + _offset('y');
198					var expandUp = (offsetTop + menuHeight > baseline);
199					if (expandUp) {
200						$u.css('margin-top',baseline - (menuHeight + offsetTop));
201					}
202					$u.css('display','none');
203				});
204			};
205		
206		return this.each(function() {
207			var $this = $(this),
208				o = $this.data('sf-options'); /* get this menu's options */
209			
210			/* if callbacks already set, store them */
211			var _onInit = o.onInit,
212				_onBeforeShow = o.onBeforeShow,
213				_onHide = o.onHide;
214				
215			$.extend($this.data('sf-options'),{
216				onInit: function() {
217					onInit.call(this); /* fire our Supposition callback */
218					_onInit.call(this); /* fire stored callbacks */
219				},
220				onBeforeShow: function() {
221					onBeforeShow.call(this); /* fire our Supposition callback */
222					_onBeforeShow.call(this); /* fire stored callbacks */
223				},
224				onHide: function() {
225					onHide.call(this); /* fire our Supposition callback */
226					_onHide.call(this); /* fire stored callbacks */
227				}
228			});
229		});
230	};
231
232})(jQuery);
233
234
235});
236
237jQuery(document).ready(function() {
238  jQuery('ul.sf-menu').superfish({
239    delay:       400,                            // one second delay on mouseout
240    animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation
241    speed:       'normal',                          // faster animation speed
242    autoArrows:  true                            // disable generation of arrow mark-up
243  });
244});
245

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.