I hope you can help me with my problem, because it seems quite odd to me. On my website I'm using some Bootstrap alerts to inform the users in case of success or errors.
After some time the alert is hidden:
setTimeout(function() {
$("#alertLogged").removeClass("show");
}, 5000);
My problem is that, because of the alert being hidden, all buttons that are behind the alert are still not clickable.
I'll try to make a jsfiddle but I can't promise that it works because I've had some problems in the past. Furthermore I#ve already tried to make the alert on bottom, which solved my problem of the buttons on top being not clickable. But I think it looks better if the alerts are at the top of the website.
Beside that I've tried to destroy the alerty completely and not only hide it which solved the problem as well.
But this is no real solution because it will make more problems if I have to display another error/success message.
There is not much code to show here but as I said I'll try to give you a jsfiddle.
Hope some of you can help me, thanks in advance :)
UPDATE
Here's the HTML code of the "alertLogged" item. It is not much because I'm doing most of it in Java Script
<div class="hide fade text-center" role="alert" id="alertLogged"></div>
UPDATE 2
After joshmoto's answer I've tried to add something to my CSS file:
.alert:not(.show){
pointer-events: none;}
but it did not change anything...
UPDATE 3
In order to get Shidersz answer going (it looks quite nice and simple) I will post the code now:
alert("TEST");
$("#alertLogged").fadeIn(1000).delay(5000).fadeOut(1000);
alert("TEST2");
So the alert("TEST") is called but "TEST2" is not, furthermore, the alert does not show up.