Chapter 11: Using Bootstrap 5 with Advanced JavaScript Features
In this chapter, we will learn about some advanced JavaScript features that can be used with the interactive components of Bootstrap 5. First, we will get a quick overview of the interactive components and see which requirements they have in common in terms of dependencies and initialization. Then, we will see how we can initialize interactive components with either data attributes or JavaScript. Following this, we will see how we can define options with either data attributes or JavaScript, and finally, we will take a closer look at how we can use JavaScript for methods and events.
In this chapter, we’re going to cover the following main topics:
- Interactive components of Bootstrap 5
- Initializing interactive components
- Defining options for interactive components
- Using JavaScript methods
- Using JavaScript events