@@ -64,7 +64,8 @@ if (navbar_maxheight < 1)
64
64
}
65
65
66
66
// Fixed transparently.
67
- var fixed_opacity = 0.7 ;
67
+ var unfixed_opacity = 0.7 ;
68
+ var fixed_opacity = 1.0 ;
68
69
69
70
// Check to see if we should just add a custom class to the navbar.
70
71
if ( nav_addclass . length > 0 )
@@ -74,13 +75,14 @@ if (nav_addclass.length > 0)
74
75
else
75
76
{
76
77
// Set general navbar settings for fixed support.
77
- navbars . css ( 'max-height' , navbar_maxheight ) ;
78
78
navbars . css ( 'z-index' , '100' ) ;
79
79
navbars . css ( 'width' , '100%' ) ;
80
80
navbars . css ( 'top' , '0px' ) ;
81
81
navbars . css ( 'left' , '0px' ) ;
82
82
}
83
83
84
+ navbars . css ( 'max-height' , navbar_maxheight ) ;
85
+
84
86
// Leaving commented function just because it was somewhat neat.
85
87
/*
86
88
navbars.each(function(i)
@@ -111,7 +113,7 @@ $(window).scroll(function(e)
111
113
112
114
if ( margin && parseInt ( margin ) > 0 )
113
115
{
114
- header_layout . css ( 'margin-bottom' , '0px' ) ;
116
+ header_layout . css ( 'margin-bottom' , navbar_maxheight ) ;
115
117
}
116
118
117
119
return ;
@@ -125,12 +127,13 @@ $(window).scroll(function(e)
125
127
{
126
128
if ( fix_class . length < 1 )
127
129
{
128
- navbars . css ( 'background' , 'rgba(var(--theme-main_nav), 1.0 )' ) ;
130
+ navbars . css ( 'background' , 'rgba(var(--theme-main_nav), ' + fixed_opacity + ' )') ;
129
131
navbars . css ( 'position' , 'fixed' ) ;
130
132
}
131
133
else
132
134
{
133
135
navbars . addClass ( fix_class ) ;
136
+ navbars . removeClass ( unfix_class ) ;
134
137
}
135
138
136
139
if ( icon )
@@ -149,12 +152,13 @@ $(window).scroll(function(e)
149
152
// Revert back to non-fixed navbar.
150
153
if ( unfix_class . length < 1 )
151
154
{
152
- navbars . css ( 'background' , 'rgba(var(--theme-main_nav), ' + fixed_opacity + ')' ) ;
155
+ navbars . css ( 'background' , 'rgba(var(--theme-main_nav), ' + unfixed_opacity + ')' ) ;
153
156
navbars . css ( 'position' , 'relative' ) ;
154
157
}
155
158
else
156
159
{
157
160
navbars . addClass ( unfix_class ) ;
161
+ navbars . removeClass ( fix_class ) ;
158
162
}
159
163
160
164
if ( icon )
0 commit comments