Why doesn't calling carousel.next() immediately show the next slide without animation?
Bootstrap carousel uses CSS transitions for smooth sliding. The slide changes visually after the animation completes, not instantly.
💡 Programmatic slide changes trigger animations, so expect a smooth slide effect, not an instant switch (see render_step 3).
Why does carousel.to(0) not work if the carousel is not initialized with JavaScript?
Programmatic methods like to() require the Bootstrap Carousel object to be created in JavaScript first (render_step 2). Without it, the methods don't exist.
💡 Always initialize the carousel with JS before calling control methods.
Why does the carousel not respond to programmatic commands if the element ID is wrong?
The JS code targets the carousel by its ID. If the ID is incorrect or missing, the carousel object won't be created, so commands have no effect.
💡 Ensure the HTML element ID matches the JS selector exactly.