Shifted custom training workflow section for better centering and improved page flow on corporate training page. Updated CSS for right alignment.
This commit is contained in:
33
js/mobile-fix.js
Normal file
33
js/mobile-fix.js
Normal file
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* Mobile navigation fix - ensures hamburger menu works properly on mobile devices
|
||||
*/
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// Get hamburger menu element
|
||||
const hamburgerMenu = document.querySelector('.hamburger-menu');
|
||||
|
||||
if (hamburgerMenu) {
|
||||
// Add additional click handler with logging
|
||||
hamburgerMenu.addEventListener('touchstart', function(e) {
|
||||
console.log('Hamburger touchstart triggered');
|
||||
// Prevent default touch behavior if needed
|
||||
e.preventDefault();
|
||||
}, { passive: false });
|
||||
|
||||
// Log that the script has loaded
|
||||
console.log('Mobile navigation fix loaded');
|
||||
|
||||
// Add visible indicator for debugging
|
||||
if (window.innerWidth <= 768) {
|
||||
hamburgerMenu.setAttribute('data-mobile-enhanced', 'true');
|
||||
}
|
||||
|
||||
// Handle window resize
|
||||
window.addEventListener('resize', function() {
|
||||
if (window.innerWidth <= 768) {
|
||||
hamburgerMenu.style.display = 'flex';
|
||||
} else {
|
||||
hamburgerMenu.style.display = 'none';
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user