How to do it…

  1. Add the Notify.js to the _js.ejs partial in the app/partial folder:
<script src="https://gitcdn.xyz/repo/jpillora/notifyjs/master/dist/notify.js"></script>
  1. Add the following code to app/partial/_recipe-06-10-js.ejs:
<script> // Basic Example $.notify("Click to hide or wait 20 seconds…");</script>

This should give us the Notify.js default styling, as shown on the projects, website.

  1. While still in the same file, let's add Bootstrap 4 success alert CSS:
 $.notify.addStyle('bs4success', { html: '<div><span class="fa fa-spinner fa-spin fa-2x"></span> <span   data-notify-text/></div>', classes: { base: { "background-color": "#dff0db", "border-color": "#d0e9c6", "color": "#3c763d", "padding": ".75rem 1.25rem", "margin-bottom": ...

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.