F
Filament15mo ago
BATMAN

call close function in js

hi how do i call the close function from another function in js
No description
4 Replies
Quadrubo
Quadrubo15mo ago
hey, can you share your code with the exact problem you have?
BATMAN
BATMANOP15mo ago
document.addEventListener('click', (e) => {

// if(e.target !== modal[0] && e.target !== modal[0].children){
// console.log('true', e.target, e.childElementCount);
// }

if (e.target === modal[0] || modal[0].contains(e.target)) {
return;
}


// console.log(e.target, modal);
$(document).ready(function() {
$('a').on("click", function(e) {
return true;
});
});

});
document.addEventListener('click', (e) => {

// if(e.target !== modal[0] && e.target !== modal[0].children){
// console.log('true', e.target, e.childElementCount);
// }

if (e.target === modal[0] || modal[0].contains(e.target)) {
return;
}


// console.log(e.target, modal);
$(document).ready(function() {
$('a').on("click", function(e) {
return true;
});
});

});
just wanna close the notification when i click any background
Quadrubo
Quadrubo15mo ago
you can access the notification objects in js
Want results from more Discord servers?
Add your server