How can you trigger an alert to close automatically in Bootstrap?

  • Using JavaScript/jQuery
  • Adding the "alert-dismissible" class
  • Setting a timer with the "data-dismiss" attribute
  • Pressing the "ESC" key
To make an alert close automatically in Bootstrap, you can set a timer using the "data-dismiss" attribute. This attribute specifies the duration (in milliseconds) for which the alert will be visible before closing.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *