Create responsive layouts quickly with Bootstrap grid, utilities, components, and theming.
Lessons
Trigger components without writing JavaScript.
JS via Data Attributes 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 JS via Data Attributes example in a small scratch file, then explain what changed and why.