/*-----------------------------------------------------------------------------------*/ /* Version 0.1.0 date 18.02.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; }); }); /*-------------------------------------------------------------------------------------------- Toggle Mobile Nav-Menu | Sidebar Left | Right by Eugen Mueller | 123Altmark ----------------------------------------------------------------------------------------------*/ jQuery(document).ready(initToggleContent); //$(window).on('resize',initToggleContent); // Rotation von Mobilen Endgeräten wie Ipad und Android Tablets, welche beim Drehen des Gerätes die Auflösung über oder unter 992px liegt, wird abgefangen /* $(window).bind('orientationchange', function(event) { initToggleContent(); }); */ function initToggleContent(){ //if($(window).width() <= 992/* && jQuery(punktMeanKlassenName).data("effect")==null */) //{ // initialisiere die toggleContent bei einer (Mobilen) Auflösung unter 992px //console.log("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(); }); /* $('.mobile-menu-btn').click(function () { $('.mean-container').slideToggle('blind'); }); $('#mobile-sidebar-left-btn').click(function () { $(".row-offcanvas").removeClass( "row-offcanvas-right, activeR"); $(".row-offcanvas").addClass( "row-offcanvas-left"); $('.row-offcanvas-left').toggleClass('activeL') }); $('#mobile-sidebar-right-btn').click(function () { $(".row-offcanvas").removeClass( "row-offcanvas-left, activeL"); $(".row-offcanvas").addClass( "row-offcanvas-right"); $('.row-offcanvas-right').toggleClass('activeR') }); */ }); /*-------------------------------------------------------------------------------------------- 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(); $('#content').css("margin-top", $content_margin_top + "px"); } else // Fixierung aufgehoben { nav.removeClass("f-nav"); $('.main-nav').removeClass("f-nav"); $('.f-head').removeClass("animate"); $('#content').removeAttr("style"); } } } }); });