I have a problem with alert messages. It is displayed normally, and I can close it when the user presses x
(close), but when the user tries to display it again (for example, click on the button event) then it is not shown. (Moreover, if I print this alert message to console, it is equal to []
.) My code is here:
<div class=alert style=display: none>
<a class=close data-dismiss=alert>×</a>
<strong>Warning!</strong> Best check yo self, you're not looking too good.
</div>
And event:
$(.alert).show();
P.S! I need to show alert message only after some event happened (for example, button clicked). Or what I am doing wrong?