Creating custom alerts and positioning them in the viewport

In this recipe, we will create four alerts that will appear in the top-right corner of a web page. To see the final result, open the chapter4/complete code's app folder, and run the git bash command on it. Follow it up with the harp server command, and navigate to localhost:9000 in your browser to see the result we will achieve in this recipe.

Upon opening the web page as explained in the preceding paragraph, you should see the four alerts appearing one after the other. Click on the close button to close any of them, and note how they are being closed with various jQuery effects.

Get Bootstrap 4 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.