F
Filament16mo 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
Quadrubo16mo ago
hey, can you share your code with the exact problem you have?
BATMAN
BATMANOP16mo 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
Quadrubo16mo ago
you can access the notification objects in js

Did you find this page helpful?