Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed the js for the custom mobile nav #261

Merged
merged 2 commits into from
Oct 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 31 additions & 31 deletions docs/javascripts/alcf-extra.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,48 +96,48 @@ if (dropdowns.length > 0) {



// Include the mobile dropdowns (unlike above, just writing it all here)
// ----------------------------------------------------------------------------
// // Include the mobile dropdowns (unlike above, just writing it all here)
// // ----------------------------------------------------------------------------


// open/close the big pane
var mobileOpen = document.getElementById('js-mobileOpen');
var mobileClose = document.getElementById('js-mobileClose');
var mobileMenu = document.getElementById('js-mobileMenu');
// // open/close the big pane
// var mobileOpen = document.getElementById('js-mobileOpen');
// var mobileClose = document.getElementById('js-mobileClose');
// var mobileMenu = document.getElementById('js-mobileMenu');

mobileOpen.addEventListener("click", function(e) {
mobileMenu .classList.replace("menu--closed", "menu--open");
});
// mobileOpen.addEventListener("click", function(e) {
// mobileMenu .classList.replace("menu--closed", "menu--open");
// });

mobileClose.addEventListener("click", function(e) {
mobileMenu .classList.replace("menu--open", "menu--closed");
});
// mobileClose.addEventListener("click", function(e) {
// mobileMenu .classList.replace("menu--open", "menu--closed");
// });


// open/close individual menus
// // open/close individual menus

var drawerHeads = document.getElementsByClassName('drawer-head');
// var drawerHeads = document.getElementsByClassName('drawer-head');

Array.prototype.forEach.call(drawerHeads, function(head){
// Array.prototype.forEach.call(drawerHeads, function(head){

head.addEventListener("click", function(e){
var mobmenu = head.dataset.mobmenu;
mobmenu = document.getElementById(mobmenu);
var arrow = this.querySelector(".drawer-arrow");

if (mobmenu.classList.contains('menu--closed')) {
mobmenu.classList.remove('menu--closed');
arrow.innerHTML = "▲"
}
else {
mobmenu.classList.add('menu--closed');
arrow.innerHTML = "▼"
}
// head.addEventListener("click", function(e){
// var mobmenu = head.dataset.mobmenu;
// mobmenu = document.getElementById(mobmenu);
// var arrow = this.querySelector(".drawer-arrow");

// if (mobmenu.classList.contains('menu--closed')) {
// mobmenu.classList.remove('menu--closed');
// arrow.innerHTML = "▲"
// }
// else {
// mobmenu.classList.add('menu--closed');
// arrow.innerHTML = "▼"
// }

});
});
// });
// });

// add listener to each of the links that toggles menus
// // add listener to each of the links that toggles menus



Expand Down