Style all the components as preferred.
Give it a class and style it the way you want.
There are two options for how the Dropdown list-element will behave:
position: relative = Dropdown list pushes down objects placed below the Dropdown
position: absolte (default) = Dropdown list overlay objects placed below the Dropdown
Add interaction and click Affect different element(s).
display: none
opacity: 0%
Apply interaction trigger Hover.
Check Affect different element and state the Dropdown List.
State it to Limit to sibling elements if you have more than one dropdown.
display: block
opacity: 100%
transition: *your choice
display: none
opacity: 0%
transition: *your choice
Style all the components as preferred.
OBS! Do not apply padding to the Dropdown List Element. That will cause the closing of the Accordion to be jumpy. Instead, place a Div inside the Dropdown List Element and let the Div serve as the wrapper of your contents in the accordion. Add the padding to this Div instead and leave
Open the Dropdown and add the contents of your choice.
position: relative = Dropdown list pushes down objects placed below the Dropdown
position: absolte (default) = Dropdown list overlay objects placed below the Dropdown
overflow: hidden
Create a new interaction and give it a name.
Select Initial Appearance and style it:
display: none
opacity: 0 %
Create a new interaction and give it a name.
Select the trigger of Dropdown, select Affect different element and type in the class name of the Dropdown list-element.
Style it:
height: auto
height: 0 px
If you have multiple dropdown accordions stacked on top of each other, make sure that you select Limit to sibling emelents.
Give the dropdown a Close Delay value of your choice, preferably same as the transition time selected in the interaction.
Style it as preferred. The text you have at the default state of your button in the Webflow designer needs to be the same where the default state text is in the javascript code.
$(document).ready(function() {
$('.your-button').hover(function() {
$(this).html('Put your hover text here'); }, function() {
$(this).html('Default state text'); }); });
$('.your-button').click(function()
{
if ($(this).text() == "Click me...")
{
$(this).text("...to change text");
}
else
{
$(this).text("Click me...");
};
});
Place in where you want it. Style it:
position: fixed
background-color: your choice
Replace name-of-your-nav with your nav class name.
.name-of-your-nav {
transition-duration: 1s;
}
Replace name-of-your-nav with your nav class name.
The property of transparent, is the color the nav will have from the start, and the above rgba value is the color it will have when scrolling
$(document).ready(function(){
var scroll_start = 0;
var startchange = $('.name-of-your-nav');
var offset = startchange.offset();
$(document).scroll(function() {
scroll_start = $(this).scrollTop();
if(scroll_start > offset.top) {
$('.name-of-your-nav').css('background-color', 'rgba(34,34,34,0.9)');
} else {
$('.name-of-your-nav').css('background-color', 'transparent');
}
});
});
Place in where you want it. Style it:
position: fixed
Replace name-of-your-nav with your nav class name.
.scrolling {
background-color: rgb(32, 32, 32); opacity: 0.5;
transition-duration: 1s;
}
Replace name-of-your-nav with your nav class name. To change the transition point, change the value of 100 to your choice.
$(window).scroll(function() {
// 100 = The point you would like to fade the nav in.
if ($(window).scrollTop() > 100 ){
$('.navigation').addClass('scrolling');
} else {
$('.navigation').removeClass('scrolling');
};
});
$('.scroll').on('click', function(e){
e.preventDefault()
$('html, body').animate({
scrollTop : $(this.hash).offset().top
}, 1500);
});
Give the main Nav Bar widgets different class names, e.g Nav Bottom and Nav Sticky.
Style the rest of the nav contents as preferred. You can probably share the same classes between the two nav widgets.
Style one of the nav widgets to:
position: fixed (top)
z-index: 1001 [higher the bottom Nav widget]
Go to the Global Objects panel and give the interaction a name.
Select the trigger of Scroll.
Check the Affect different element(s) and type in the class of the fixed nav bar widget
display: none
display: block
Click Done when finished.
Give it a class and change the settings so the hamburger icon is visible on desktop mode.
Style the Nav Widget as preferred, but this needs to be set:
position: fixed (top)
Give them classes and style as preferred.
Use these settings:
position: relative
z-index: 1001 (always set it higher than the Nav Bar Widget which has a default value of 1000)
Give it a class and style if as preferred but these settings needs to be set for the Nav Menu:
position: fixed (full)
menu type: dropdown
Place in where you want it. If you want the nav to be fixed at the top, style it:
position: fixed
z-index: 1
Give the Link Block a class of Nav Menu Button. Style it as preferred.
Give the nav icon a class of Nav Icon and style it as preferred.
This setting needs to be set for the Nav Menu Button:
position: relative
z-index: 2 (or higher as it needs to be placed above the coming Nav Menu).
Place it inside the section of Nav. Give it a class of Nav Menu.
Style it as preferred but these settings are needed:
width: 100%
height: 100%
position: fixed (full setting)
z-index: 1 (this nav menu have to be layered underneath the Nav Menu Button element)
This nav design type usually comes with the intention of having few and big links. If you have so many links that your overlayered nav needs to be scrollable, set this setting on the section of Nav Menu:
overflow: scroll
Style it:
opacity: 0%
display: none
Give the interaction a name.
Select the trigger of Click.
Check the Affect different element(s) and type in the class of Nav Menu.
opacity: your choice
display: block
opacity: 0%
display: none
Style it the preferred way.
Only the tab itself need to be unique. The rest of the elements in the tab widget can share the same styles for a second tab widget.
Select the link you want to be aimed for the tab. In the URL field put: /slug-name/name-of-page?tab=your-tab-class
Lowcase letters MUST be used and white spaces between words are replaced with a ”-” (dash) !
var Webflow = Webflow || [];
Webflow.push(function () {
var tabName = getParam('tab');
if (!tabName) return;
$('.' + tabName).triggerHandler('click');
function getParam(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results == null ? "" : decodeURIComponent(results[1].
replace(/\+/g, " "));
}
});
In the URL area, paste page URL: /name-of-page#name-of-section-or-container-or-div