Skip to content

Commit

Permalink
use new bootstrap to dismiss alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
longhotsummer committed Aug 15, 2024
1 parent 7f949fe commit 05500d0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion indigo_app/static/javascript/indigo/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ $(function() {

// Toasts should disappear after a few seconds
function nukeToasts() {
$('.alert-dismissible.auto-dismiss').alert('close');
for (let el of document.querySelectorAll('.alert-dismissible.auto-dismiss')) {
bootstrap.Alert.getOrCreateInstance(el).close();
}
}
setTimeout(nukeToasts, 3 * 1000);
});

0 comments on commit 05500d0

Please sign in to comment.