sigit_design/assets/js/signMobileBox.js

14 lines
627 B
JavaScript
Raw Normal View History

document.getElementById('pageActionTriggerMobile').addEventListener('click', function() {
var targetDiv = document.getElementById('pageActionTriggerMobileTarget');
var innerElement = this.querySelector('*'); // Selects the first child element of the clicked element
// Toggle the display property of the target div
if (targetDiv.style.display === 'none' || targetDiv.style.display === '') {
targetDiv.style.display = 'flex';
innerElement.style.transform = 'rotate(180deg)';
} else {
targetDiv.style.display = 'none';
innerElement.style.transform = 'rotate(0deg)';
}
});