Create responsive layouts quickly with Bootstrap grid, utilities, components, and theming.
Lessons
Understand how Bootstrap JS powers interactive components.
Bootstrap JavaScript is easiest to learn by reading the example, changing it, and observing the result.
// Programmatic control of a Bootstrap component
const modalEl = document.querySelector('#demoModal');
const modal = new bootstrap.Modal(modalEl);
modal.show();
modalEl.addEventListener('hidden.bs.modal', () => {
console.log('Modal closed');
});Practice the Bootstrap JavaScript example in a small scratch file, then explain what changed and why.