There is an alert component in bootstrap. If the component will be deleted instead of hidden after clicking the close button, what should I do if I want to display it again?
bootstrap-alert.js source code snippet:
function removeElement() {$parent.trigger('closed').remove()}In theory, change .remove() to .hide(), and then add $('#alert').show(); where you need to redisplay.
But in actual application, you can remove the data-dismiss of the close button and add onclick="$('#my_alert').hide();"
This can still be displayed with .show().
The above is the relevant knowledge about how to solve the BootStrap alert prompt box that I introduced to you after closing the alert box of BootStrap. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time. Thank you very much for your support to Wulin.com website!