PageSourceSearch

https://www.musik-heckmann.de/wp-content/themes/musik-heckmann/js/functions.js

js musik-heckmann.de collected 2026-10-10 02:03:58 UTC 4,443 bytes, 133 lines download raw bytes

1
2// ---------- Responsive Menu ----------
3
4jQuery(function ($) {
5  
6    // Menu buttons and opening function
7
8    // Var 1: Slide from top
9    var mainMenu = $('#main-menu')
10    $('#menu-button').click(function () {
11      if (mainMenu.position() ) {
12        mainMenu.slideToggle() 
13      } else {
14        mainMenu.slideToggle()
15      }
16    })
17
18    // Var 2: Slide from left
19    /*
20    var mainMenu = $('#main-menu')
21    $('#menu-button, #close-menu').click(function () {
22      if (mainMenu.position().left < 0) {
23        mainMenu.animate({left: '0%'}, 500)
24      } else {
25        mainMenu.animate({left: '-100%'}, 500)
26      }
27    })
28    */
29
30    // Var 3: Slide from right
31    /*
32    var mainMenu = $('#menu-button-flap')
33    $('#menu-button, #close-menu, nav#main-menu ul li a').click(function () {
34      if ($(window).width() > 800) {
35        if (mainMenu.css("margin-right") == "-400px") {
36          mainMenu.animate({"margin-right": '+=400'});
37        } else {
38          mainMenu.animate({"margin-right": '-=400'});
39        }
40      } else {
41        if (mainMenu.css("margin-right") == "-300px") {
42          mainMenu.animate({"margin-right": '+=300'});
43        } else {
44          mainMenu.animate({"margin-right": '-=300'});
45        }
46      }
47    })
48    */
49
50    // Add class if menu is open
51    $('#menu-button').click(function() {
52      $(this).toggleClass('is-open');
53    });
54  
55    // Overview and sub menu classes
56    mainMenu.find('ul li a').each(function () {
57      if (!$(this).is(':last-child')) {
58        $(this).addClass('has-sub');
59        $(this).next().prepend('<li class="overview"><a href="' + $(this).attr('href') + '">Übersicht ' + $(this).text() + '</a></li>');
60  
61        $(this).click(function (e) {
62          if ($('#menu-button').hasClass('visible')) {
63            $(this).next().slideToggle('fast');
64            e.preventDefault();
65          }
66        })
67      }
68    })
69
70    // Submenu drop down
71    var windowWidth = 0;
72    $(window).resize(function() {
73      var newWindowWidth = $(window).width()
74      if (newWindowWidth != windowWidth) {
75        $('#menu-button:visible').addClass('visible');
76        $('#menu-button:hidden').removeClass('visible');
77        if(!$('#menu-button').hasClass('visible')) {
78          mainMenu.removeAttr('style');
79          mainMenu.find('ul ul').removeAttr('style');
80        }
81        windowWidth = newWindowWidth;
82      }
83    });
84    $(window).resize();
85    
86    // Add class if sub menu is open
87    $('.has-sub').click(function() {
88      $(this).toggleClass('sub-open');
89    });
90
91})
92
93
94
95// ---------- Switching Header ----------
96
97jQuery(document).ready(function(){
98    jQuery(window).scroll(function(){
99        if ($(window).width() > 1000) {
100            if(jQuery(this).scrollTop()>=200){
101                jQuery('header').attr('style','height: 60px; transition: all 0.3s ease 0s;');
102                jQuery('#logo').attr('style','max-width: 160px; transition: all 0.3s ease 0s;');
103                jQuery('nav#main-menu').attr('style','top: 60px; transition: all 0.3s ease 0s;');
104                jQuery('nav#main-menu ul li div').attr('style','top: 104px; transition: all 0.3s ease 0s;');
105            }   
106            else if (jQuery(this).scrollTop()<200) {
107                jQuery('header').attr('style','height: 120px; transition: all 0.3s ease 0s;')
108                jQuery('#logo').attr('style','max-width: 275px; transition: all 0.3s ease 0s;');
109                jQuery('nav#main-menu').attr('style','top: 120px; transition: all 0.3s ease 0s;');
110                jQuery('nav#main-menu ul li div').attr('style','top: 164px; transition: all 0.3s ease 0s;');
111            }
112        }
113        else {}
114    })
115})
116
117
118
119// ---------- Slider ----------
120
121$(function () {
122
123  $("#startslider").responsiveSlides({
124    auto: true,             // Boolean: Animate automatically, true or false
125    speed: 1000,            // Integer: Speed of the transition, in milliseconds
126    timeout: 4000,          // Integer: Time between slide transitions, in milliseconds
127    pager: true,           // Boolean: Show pager, true or false
128    nav: true,             // Boolean: Show navigation, true or false
129    random: false,          // Boolean: Randomize the order of the slides, true or false
130    pause: true,           // Boolean: Pause on hover, true or false
131  });
132
133});

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.