I have a flask python code for user login and change password. When I change password I need to flash a message whether password was changed correctly or not.
{% with messages = get_flashed_messages() %}
{% if messages %}
{% for message in messages %}
<div class="alert alert-primary alert-dismissible fade show" role="alert">
<span>{{ message }}</span>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
{% endfor %}
{% endif %}
{% endwith %}
I have used the above code snippet to flash message. My problem is that when I click the 'X' icon to close the message, I does nothing. can anyone please tell me where I am doing wrong? Also is it possible to timeout the alert message (i.e. alert message disappears after a couple of seconds?) if yes then how?
NOTE: I have zero experience in Javascript or any other method. Please provide me answers through HTML,CSS or python only. Thank you