Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
3 tasks done
Kembreg1405 opened this issue Sep 14, 2024 · 3 comments
Open
3 tasks done

Comments

@Kembreg1405
Copy link

Kembreg1405 commented Sep 14, 2024

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

@julien-deramond
Copy link
Member

julien-deramond commented Sep 14, 2024

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.

@Kembreg1405
Copy link
Author

Kembreg1405 commented Sep 14, 2024

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

@rickvdbosch
Copy link

rickvdbosch commented Oct 8, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To analyze
Development

No branches or pull requests

3 participants