/*-----------------------------------------------------------------------------------*/ /* Version 0.1.2 date 30.09.2016 /*-----------------------------------------------------------------------------------*/ /*// first set the body to hide and show everything when fully loaded document.write(""); jQuery(document).ready(function(){ // here for each comment reply link of WordPress jQuery( '.comment-reply-link' ).addClass( 'btn btn-sm btn-default' ); // here for the submit button of the comment reply form jQuery( '#submit' ).addClass( 'btn btn-default' ); // Style contact form submit button jQuery( '.wpcf7-submit' ).addClass( 'btn btn-default' ); // Add thumbnail styling jQuery( '.wp-caption' ).addClass( 'thumbnail' ); // Add fixed size to tag cloud jQuery('.tagcloud a ').css('font-size' , '12px'); // Apply styling for regular submit buttons jQuery('input[type="submit"]').addClass('btn btn-default'); // Now we'll add some classes for the WordPress default widgets - let's go jQuery( '.widget_rss ul' ).addClass( 'media-list' ); // Add Bootstrap style for drop-downs jQuery( '.postform' ).addClass( 'form-control' ); jQuery( 'table#wp-calendar' ).addClass( 'table table-striped'); jQuery(document.body).show(); });*/ /*-----------------------------------------------------------------------------------*/ /* Scroll to Top by Andre Gagnon /*-----------------------------------------------------------------------------------*/ jQuery(document).ready(function(){ //Check to see if the window is top if not then display button jQuery(window).scroll(function(){ if (jQuery(this).scrollTop() > 100) { jQuery('.top').fadeIn(); } else { jQuery('.top').fadeOut(); } }); //Click event to scroll to top jQuery('.top').click(function(){ jQuery('html, body').animate({scrollTop : 0},800); return false; }); }); /*-------------------------------------------------------------------------------------------- One Click Page - Menu | onePageNav ----------------------------------------------------------------------------------------------*/ /* jQuery(document).ready(function(){ // One Click Menu jQuery('#header .menu').onePageNav({ currentClass: 'current', changeHash: false, scrollSpeed: 750, offsetScroll: $('.main-nav').outerHeight()+15 }); }); */ /*-------------------------------------------------------------------------------------------- Toggle Mobile Nav-Menu | Sidebar Left | Right by Eugen Mueller | 123Altmark ----------------------------------------------------------------------------------------------*/ jQuery(document).ready(initToggleContent); function initToggleContent(){ toggleContent('.toggle-sidebar-left', '.mobile-sidebar-left-btn', 'blind', {direction:'left', easing: 'easeInOutQuart'}, 700 ); toggleContent('.toggle-sidebar-right', '.mobile-sidebar-right-btn', 'blind', {direction:'right', easing: 'easeInOutQuart'}, 700, '#content', -1, -1, 'top' ); /* INFO zur Klasse "toggleContent(toggleClass, toggle_button, effect, options, duration, heightClass, singlePixelMove, signChange, position)": - die letzten 5 Übergabe Parameter der Klasse toggleContent() können angegeben werden und dienen zur Verschiebung der toggleClass im HTML. - Anwendung im Queltext ist wie folgt: var value= ($(heightClass).innerHeight()+singlePixelMove)*signChange; jQuery(toggleClass).css(position, (value) + "px"); z.B. var value= ($('#content').innerHeight()+-1)*-1; jQuery(toggleClass).css('top', (value) + "px"); */ toggleContent('.meanmenu-place', '.mobile-menu-btn', 'blind', {direction:'up', easing: 'easeInOutQuart'}, 700 ); } //End initToggleContent() jQuery("document").ready(function($){ // MeanMenu jQuery('.main-nav').meanmenu({meanMenuContainer: '.meanmenu-place', meanScreenWidth: "992",meanExpand: "+"}); // make .menu from display:none -> block jQuery('.mean-nav .menu').show(); // remove standard button from meanmenu.js jQuery('.meanmenu-reveal').remove(); $( window ).resize(function() { jQuery('.mean-nav .menu').show(); }); }); /*-------------------------------------------------------------------------------------------- Fixed Scroll Down modified by Eugen Mueller ----------------------------------------------------------------------------------------------*/ jQuery("document").ready(function($){ var nav = $('#header .navcontainer'); $(window).scroll(function () { // ab einer Auflösungsbreite von 992px wird der Navcontainer gefixt if(window.innerWidth >= 992) { // Gesamt Höhe bis zum main-nav welches fixiert wird $totalheight = $(".header-top").outerHeight(true); // Abfangen des Grenzverlauf beim Scrollen if(window.innerHeight < ($("body").outerHeight()-$(".navcontainer").outerHeight()- $totalheight )) { // Fixierung setzen if ($(this).scrollTop() > $totalheight) { nav.addClass("f-nav"); $('.f-head').addClass("animate"); $content_margin_top = $('.navcontainer').outerHeight(); $('.push-container').css("margin-top", $content_margin_top + "px"); } else // Fixierung aufgehoben { nav.removeClass("f-nav"); $('.main-nav').removeClass("f-nav"); $('.f-head').removeClass("animate"); $('.push-container').removeAttr("style"); } } } }); });