Fixed navbar


#1

Hello … i treid some solutions to get my main menubar(navbar) on a fixed position. also treid option on this post https://rtcamp.com/support/topic/navbar-mods/ but also does not work…

im using the child theme … thanks


#2

Hello nestrosu,
Can you please share your site url? So I can debug the issue.


#3

http://awakingminds.com/


#4

Hello nestrosu,
Add following jQuery code in .JS file. Let me know for further assistance.

/* Fixed Parent Menu */  
var nav = jQuery('#rtp-primary-menu'),  
	navHeight = nav.height(),  
	headerHeight = 80 - navHeight;  

jQuery(window).scroll(function () {  
	if (jQuery(this).scrollTop() > headerHeight) {  
		nav.css({  
			'position': 'fixed',  
			'top': '0',  
			'z-index': '9999'  
		});  
	} else {  
		nav.removeAttr('style');  
	}  
});

#5

strange but im not so familiar with jquery but what .js file your talking about, cause i tested them all nothing works… or do i create my own .js file???


#6

oke i see i only need to put it in rtp-custom-scripts.js right?? but does not work


#7

You can add above codes in rtp-concat-lib.js or you can create new file.

Are you using rtPanel Child Theme or make changes in rtPanel theme itself?


#8

child theme


#9

just put it in rtpanel rtp-concat-lib.js and it works just like i wanted. thanks alot


#10

@nestrosu

Glad to know your issue got solved. I am closing this support thread. If you face any other issue in future, please create another thread.


#11