Skip to content

Commit

Permalink
Fix issue Two (Sticky) headers #293
Browse files Browse the repository at this point in the history
  • Loading branch information
sonvnn committed Feb 22, 2023
1 parent cd36ac1 commit a39ee2f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions assets/vendor/astroid/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@

var _breakpoint = deviceBreakpoint(true);

if (_breakpoint == 'xl' || _breakpoint == 'lg') {
if (_breakpoint === 'xl' || _breakpoint === 'lg') {
if (stickyHeader.hasClass('header-sticky-desktop') && (_winScroll > _headerBottom)) {
stickyHeader.removeClass('d-none');
stickyHeader.addClass('d-flex');
Expand All @@ -88,8 +88,12 @@
stickyHeader.removeClass('d-flex');
stickyHeader.addClass('d-none');
}
} else if (_breakpoint == 'sm' || _breakpoint == 'md') {
} else if (_breakpoint === 'sm' || _breakpoint === 'md') {
if (stickyHeader.hasClass('header-static-tablet')) {
if (stickyHeader.hasClass('d-flex')) {
stickyHeader.addClass('d-none');
stickyHeader.removeClass('d-flex');
}
return;
}
if (stickyHeader.hasClass('header-sticky-tablet') && (_winScroll > _headerBottom)) {
Expand All @@ -104,6 +108,10 @@
}
} else {
if (stickyHeader.hasClass('header-static-mobile')) {
if (stickyHeader.hasClass('d-flex')) {
stickyHeader.addClass('d-none');
stickyHeader.removeClass('d-flex');
}
return;
}
if (stickyHeader.hasClass('header-sticky-mobile') && (_winScroll > _headerBottom)) {
Expand Down

0 comments on commit a39ee2f

Please sign in to comment.