function screenClass() { // ADD A CLASS Start "use strict"; if ($(window).innerWidth() <= 767) { $('body').addClass('mobile-screen').removeClass('desktop-screen'); } else { $('body').addClass('desktop-screen').removeClass('mobile-screen'); } // ADD A CLASS End // KOPIEREN EINES ELEMENTS AN EINE ANDERE STELLE Start // Icons if ($(window).innerWidth() <= 575.98) { $('#append').appendTo($('#append_paste')); } // KOPIEREN EINES ELEMENTS AN EINE ANDERE STELLE End // BUGFIX APPLE DEVICES 100vh Start const appHeight = () => { const doc = document.documentElement doc.style.setProperty('--app-height', `${window.innerHeight}px`) } window.addEventListener('resize', appHeight) appHeight() // BUGFIX APPLE DEVICES 100vh End } screenClass(); $(document).ready(function () { // SHRINK Start $(window).scroll(function () { if ($(document).scrollTop() > 100) { $('.default-header').addClass('shrink'); } else { $('.default-header').removeClass('shrink'); } // SHRINK End /* BACK TO TOP PLUGIN */ if ($(this).scrollTop() >= 1000) { $('.backtotop').fadeIn(); } else { $('.backtotop').fadeOut(); } }); $('.backtotop').click(function () { $('body,html').animate(0, 800); $('body,html').animate({ scrollTop: 0 }, 800); return false; }); /* CLOSE BACK TO TOP PLUGIN */ // REPLACE SVG Start jQuery('img.svg').each(function(){ var $img = jQuery(this); var imgID = $img.attr('id'); var imgClass = $img.attr('class'); var imgURL = $img.attr('src'); jQuery.get(imgURL, function(data) { // Get the SVG tag, ignore the rest var $svg = jQuery(data).find('svg'); // Add replaced image's ID to the new SVG if(typeof imgID !== 'undefined') { $svg = $svg.attr('id', imgID); } // Add replaced image's classes to the new SVG if(typeof imgClass !== 'undefined') { $svg = $svg.attr('class', imgClass+' replaced-svg'); } // Remove any invalid XML tags as per http://validator.w3.org $svg = $svg.removeAttr('xmlns:a'); // Replace image with new SVG $img.replaceWith($svg); }, 'xml'); }); /* REPLACE SVG End */ // STACK MENU Start $('#stack-menu').stackMenu({ //all: true, // add links to parents //allTitle: 'All' // parents links text }); var trigger = $('.jumpmark_selector'); var list = $('.jumpmark_container'); trigger.click(function() { trigger.toggleClass('active'); list.slideToggle(200); }); // this is optional to close the list while the new page is loading list.click(function() { trigger.click(); }); // STACK MENU End // document.ready End });