Home › Forums › Basel support forum › Re-Design of Sticky Nav
Re-Design of Sticky Nav
- This topic has 5 replies, 2 voices, and was last updated 5 years, 2 months ago by Artem Temos.
-
AuthorPosts
-
September 17, 2019 at 11:23 am #144566
laneo2016ParticipantI’m trying to change the sticky nav’s appearance, I’ve been trawling through the code and have made amendments to core/themes/mytheme/js/functions.js however it isn’t changing the appearance. Can you let me know where I’m going wrong/point me in the direction of the correct file to change.
I’ve copied the amended code below where I’ve change functions.js. The change adds the search bar to the middle of the sticky nav and put the navigation below. Also attached an image to give you a visual.
var logo = header.find(“.site-logo”).clone().html(),
navigation = header.find(“.main-nav”).clone().html(),
searchextend = header.find(“.search-extended”).clone().html(),
rightColumn = header.find(“.right-column”).clone().html();var headerClone = [
‘<div class=”sticky-header header-clone”>’,
‘<div class=”container”>’,
‘<div class=”site-logo”>’ + logo + ‘</div>’,
‘<div class=”search-extended”>’ + searchextend + ‘</div>’,
‘<div class=”right-column”>’ + rightColumn + ‘</div>’,
‘</div>’,
‘</div>’,
‘<div class=”navigation-wrap”>’,
‘<div class=”container”>’,
‘<div class=”main-nav site-navigation kitchnbathco-navigation”>’ + navigation + ‘</div>’,
‘</div>’,
‘</div>’,
].join(”);Attachments:
You must be logged in to view attached files.September 17, 2019 at 1:24 pm #144625
Artem TemosKeymasterHi,
Could you please send us a link to your website where we can see this issue?
Kind Regards
September 17, 2019 at 3:35 pm #144695
laneo2016ParticipantSure – details are all contained within the private content.
September 18, 2019 at 6:41 am #144803
Artem TemosKeymasterYou are editing functions.js file but on your website functions.min.js is used. Try to disable JS minify option in Theme Settings -> Performance.
September 18, 2019 at 9:47 am #144847
laneo2016ParticipantWorked perfectly, thank you.
If I make changes to the original js (e.g. functions.js) files and then select the option to minify within Performance, does the theme automatically minify the file?
Do you have any guidance on the other point below…
When the sticky nav becomes sticky (when scrolling scroll down) and you try and hover or click on a navigation item to view the dropdown, it doesn’t display. It’s a mega menu, not sure if there’s anything on the theme that’s blocking the functionality?
September 18, 2019 at 11:59 am #144913
Artem TemosKeymasterNo, this option doesn’t minify the file automatically. You need to use some minification plugin for this. Seems that this kind of plugin for mega menu is not working with such kind of sticky header.
-
AuthorPosts
Tagged: sticky nav
- You must be logged in to create new topics. Login / Register