twbs / twbs/bootstrap

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

Open
#40,833 3 comments 1 reaction 0 assignees View on GitHub

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
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.