Bootstrap 5 carousel will not autoplay if added to the DOM after page load.
Open
Nobody has claimed this yet.
docs
enhancement
v5
- Dominant language
- MDX
- Stars
- 175k
- Forks
- 78.6k
- Avg merge
- 7h 19m
- Merged PRs (30d)
- 35
Description
Prerequisites
- I have searched for duplicate or closed issues
- I have validated any HTML to avoid common problems
- I have read the contributing guidelines
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no file or test. Start by locating the Bootstrap carousel documentation and its existing autoplay example, then reproduce the behavior with carousel markup inserted after page load. Update the relevant documentation with the initialization steps for dynamically inserted markup and verify that the example autoplays in Chrome.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bootstrap, javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100