Is there a more efficient way to close all modals in my project without having to specify the ID of each one individually? Currently, I am using the following code:
closeModals() {
$('#new-user').modal('hide');
$('#new-project').modal('hide');
$('#new-task').modal('hide');
}
I have over 20 modals in my project and it becomes tedious to repeat the modal IDs. Any suggestions or solutions would be greatly appreciated. Thank you!