Bootstrap Toast component provides an easy way to mimic the functionality of push notifications. Bootstrap Toast is like an alert box that can be displayed to the user whenever an event occurs. This component has been built with CSS flexbox which makes it easy to position and align.
It is not necessary to show the toast on a button click. It can be shown for any type of event that occurs in the browser. Let’s see an example.
Example: Creating Bootstrap Notification/Toast. In this example we will show a push notification when the user scrolls the <div> in the page. To create a bootstrap toast we need to use the toast class on a division and add two divisions inside it with classes toast-header and toast-body. We will show the notification using jquery.
- Before Scrolling the content:
- After Scrolling the content:
- How to place button in top Right corner using bootstrap?
- How to call PHP function on the click of a Button ?
- How to remove active nav-tab when click outside of nav-tab in Bootstrap ?
- Bootstrap 4 | Button Groups
- How to set the button alignment in Bootstrap ?
- How to enable Bootstrap tooltip on disabled button ?
- How to align button to right side of text box in Bootstrap?
- button tag vs input type="button" attribute
- How to add a new line in the alert box ?
- How to pop an alert message box using PHP ?
- HTML | Window alert( ) Method
- Include Bootstrap in AngularJS using ng-bootstrap
- How to add many functions in one ng-click directive?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.