/** * Theme Js file. **/ // ===== Mobile responsive Menu ==== function author_writer_menu_open_nav() { jQuery(".sidenav").addClass('open'); } function author_writer_menu_close_nav() { jQuery(".sidenav").removeClass('open'); } // ===== Scroll to Top ==== jQuery(function($){ $(window).scroll(function() { if ($(this).scrollTop() >= 50) { $('#return-to-top').fadeIn(200); } else { $('#return-to-top').fadeOut(200); } }); $('#return-to-top').click(function() { $('body,html').animate({ scrollTop : 0 }, 500); }); }); // ===== Loader ==== jQuery('document').ready(function($){ setTimeout(function () { jQuery(".loader").fadeOut("slow"); },1000); }); //===== logo customization ======= wp.customize( 'author_writer_logo_width', function( value ) { value.bind( function( to ) { jQuery( '.custom-logo-link img' ).css( 'width',to + 'px' ); } ); } );