bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

Bootstrap 5 carousel will not autoplay if added to the DOM after page load.

Open Kembreg1405 opened this issue 1 year ago • 3 comments

Prerequisites

Describe the issue

Using ajax, we add the carousel html to the page, after the page has been loaded. The carousel does not autoplay.

Reduced test cases

Add to the bootstrap documentation page the steps to have the carousel autoplay when the html is inserted after pageload.

What operating system(s) are you seeing the problem on?

Windows

What browser(s) are you seeing the problem on?

Chrome

What version of Bootstrap are you using?

v5.1

Kembreg1405 avatar Sep 14 '24 07:09 Kembreg1405

Thanks for suggesting this enhancement, @Kembreg1405. While I see the value in it, it seems to address a rather specific use case. Personally, I'm hesitant to include this information as it might risk overcomplicating the documentation. Plus, I haven't checked, but it might also be true for other components or attributes/properties. I'd love to hear feedback from the community or core team members on this.

julien-deramond avatar Sep 14 '24 09:09 julien-deramond

Bonjour Julien.

The info on the page is vertical and grouped in sections, each with a header.

People can skip the parts that are not relevant.

I spent literally 2 days getting this to work. An example would have helped me with this.

A text-only carousel is probably more relevant than "Individual .carousel-item interval" which is already one of the examples on the page.

Suggest adding 2 new examples.

Text only

With html insertion after page load

Kembreg1405 avatar Sep 14 '24 12:09 Kembreg1405

I spent literally 2 days getting this to work. An example would have helped me with this.

@Kembreg1405 Could you maybe share this example here for people finding this issue but then not finding the answer?

rickvdbosch avatar Oct 08 '24 07:10 rickvdbosch