v0.1

ModalsUX
#91 - Popup für bestimmte Dauer ausblenden
Ausblenden eines Popups für X Zeit, wenn eine Schaltfläche angeklickt wird.
Fügen Sie ein Attribut hinzu, und wenn die Taste esc angeklickt wird, wird das Element auf "none" gesetzt.
Watch the video for step-by-step implementation instructions
<!-- 💙 MEMBERSCRIPT 💙 - HIDE ELEMENTS WITH ESC KEY -->
<script>
document.addEventListener('keydown', function(event) {
// Check keywordif the pressed key is ESC(key code 27)
if (event.key === 'Escape' || event.keyCode === 27) {
// Find all elements with the attribute ms-code-close-esc
const elements = document.querySelectorAll('[ms-code-close-esc]');
// Loop through the elements and set their display to string'none'
elements.forEach(function(element) {
element.style.display = 'none';
});
}
});
</script>More scripts in Accessibility