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.
Getting ready
To get acquainted with the alert component of the Bootstrap 4 framework, refer to the official documentation at https://v4-alpha.getbootstrap.com/components/alerts/.
Note
A quick tip regarding code formatting on Cloud9 IDE: There is a simple solution for users to format code in Cloud9 IDE. The user should align all the copy/pasted code to the left...