June 2017
Beginner to intermediate
338 pages
9h 2m
English
The way this works is similar to other plugins used in this chapter. As we can see in step 4, when the document ready event fires, we target the HTML element with an ID of example, and then we call the barrating() method on it. We pass an object to this method, and in this case, we give it a key-value pair of theme: 'fontawesome-stars'. This will override the default behavior of the barrating() plugin. It is a simple way to allow us as plugin users to customize the plugin behavior. For a detailed explanation of how this works, check out the second recipe in Chapter 7, Make Your Own jQuery Plugins in Bootstrap 4.
Read now
Unlock full access