Amateurfunkgesetz

= 0.3*$(this).height() ) { $('#return-to-top').addClass('show'); $('#navbar-esb').addClass('bgcolor'); $('#mouse').addClass('hide'); } } else { $('#return-to-top').removeClass('show'); $('#navbar-esb').removeClass('bgcolor'); $('#mouse').removeClass('hide'); } }); /* hide collapsible navbar on click */ $('.navbar-collapse .nav-link').on('click',function() { $('.navbar-collapse').removeClass('show'); $('.navbar-toggler').addClass('collapsed'); }); /* Enable smooth scrolling on all links with anchors */ $('a.scrollto[href^="#"]').on('click', function(e) { e.preventDefault(); var hash = this.hash; // animate $('html, body').animate({ scrollTop: $(hash).offset().top }, 600, function(){ // when done, add hash to url if(hash!='#top') { window.location.hash = hash; } else { history.replaceState(null, null, ' '); } }); }); /* Updating address bar while scrolling */ $(window).on('activate.bs.scrollspy', function(e) { var hash = $('.nav-item .active').attr('href'); if(hash!='#top') { history.replaceState({}, '', hash); } else { history.replaceState(null, null, ' '); } }); // make iframe active on click, disable on mouseleave $('.embed-responsive iframe').each( function(i, iframe) { $(iframe).parent().hover( // make inactive on hover function() { $(iframe).css('pointer-events', 'none'); }).click( // activate on click function() { $(iframe).css('pointer-events', 'auto'); }).trigger('mouseover'); // make it inactive by default as well }); /* used in Mobile view, where Tabs are toggled to Dropdown */ $('#contactSelect').on('change', function (e) { $('#contactTabContent .tab-pane').removeClass('show active'); $('#'+$(this).val()).addClass('show active'); }); }); nach oben