Skip to content

Commit

Permalink
Solution?
Browse files Browse the repository at this point in the history
  • Loading branch information
gjb2048 committed Sep 13, 2023
1 parent 87f0229 commit 2a983db
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion amd/build/secondary_navigation.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions amd/src/secondary_navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ define(['jquery', 'core/log'], function($, log) {

return {
init: function() {
$(document).ready(function($) {
$(document).ready(function() {
log.debug('Campus Secondary Navigation AMD init');
var secondarynavigation = document.getElementById("secondary-navigation");

Expand All @@ -16,10 +16,13 @@ define(['jquery', 'core/log'], function($, log) {
var currentSY = window.scrollY;
var newSY = currentSY;
var navbar = document.getElementById("campusnavbar");
var ntop = navbar.getBoundingClientRect().top;
var nheight = navbar.getBoundingClientRect().height;
var ntop = 0;
var nheight = 0;
if (navbar !== null) {
ntop = navbar.getBoundingClientRect().top;
nheight = navbar.getBoundingClientRect().height;
}

//var snheight = secondarynavigation.getBoundingClientRect().height;
var sntop = secondarynavigation.getBoundingClientRect().top;
var snft = false;
log.debug('Wini ' + currentSY);
Expand Down

0 comments on commit 2a983db

Please sign in to comment.