Reply To: Page Jumps with Sticky Menu

Home Forums WordPress Themes – Premium Circumference Page Jumps with Sticky Menu Reply To: Page Jumps with Sticky Menu

#17060
Sushil Adhikari
Moderator

Hi there,

Please remove all code that is given on previous thread

//remove celestial theme customize function of parent
add_action('after_setup_theme', 'circumference_child_remove_sticky_action');
function circumference_child_remove_sticky_action() {
	remove_action('wp_head', 'celestial_theme_customize_js');
}
//add sticky menu with offset value 100
add_action('wp_head', 'circumference_child_add_Sticky');
function circumference_child_add_Sticky() {
	?>

	(function ( $ ) {
		$(document).ready(function(){
			var active = "";
            if (active == 1) {
            	$(window).scroll(function() {

            		var scrollTop = $(window).scrollTop();
            		var window_height = $( window ).height();
            		var content_height = $('#cir-wrapper').height();
            		var sticky_menu_height = $('header#cir-site-header').height();
            		if (scrollTop > 100 ) {
	            		if ( (parseInt(content_height) ) > (parseInt(window_height) + parseInt(200) + parseInt(sticky_menu_height) ) ) {
	            			$('#logo img').css({"width":"50%"});
	            			$("#cir-site-header").css({"position":"fixed", "right":"0px", "left":"0px", "top": "0px","z-index":"1080","padding": "5px 0px 0px 0px", 'box-shadow': '0.5px 0.5px 0.5px #EAEAEA'});
	            			$("#site-navigation").css({"margin":"10px 0"});
	            		} 
            		} else {
						$('#logo img').css({"width":"100%"});
						$("#cir-site-header").css({"position":"relative", 'box-shadow':'none', "padding": "2em 0"});
				    }	
				});
			}	
		});
})(jQuery);

<?php
}

Note: Please be online at our live chat while preceding this process.

Thanks