Skip to content

Commit

Permalink
[Website] change getting window width method
Browse files Browse the repository at this point in the history
  • Loading branch information
bullet03 committed Jul 18, 2022
1 parent 799eed2 commit 87a3423
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion website/www/site/assets/js/page-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ $(document).ready(function() {
offset: $("." + idMainContainer).offset()
};

if($(window).width() > CONST.DESKTOP_BREAKPOINT) {
const windowWidth = window.innerWidth || document.documentElement.clientWidth ||
document.body.clientWidth;
if(windowWidth > CONST.DESKTOP_BREAKPOINT) {
$("." + idPageNav).css({
left: mainContainerData.offset.left + mainContainerData.width - CONST.PAGENAV_WIDTH
});
Expand Down

0 comments on commit 87a3423

Please sign in to comment.