Created by: jimmymain
There are numerous questions on stack overflow relating to how the carousel becomes broken when it is emptied for any reason. This makes binding slides using angular or similar technologies very difficult, as they will routinely replace the set of slides with a new set.
whist I believe that calling $.carousel()
should reset all the settings (particularly the sliding
state), this simpler tweak at least ensures that if you use an angular / react binding to the carousel and it becomes empty, it does not get stuck in a sliding state.
please consider this pull - or something similar.
- https://stackoverflow.com/questions/29027830/getting-cannot-read-property-offsetwidth-of-undefined-with-bootstrap-carousel
- https://stackoverflow.com/questions/35918723/bootstrap-carousel-controls-causing-error
- https://stackoverflow.com/questions/29027830/getting-cannot-read-property-offsetwidth-of-undefined-with-bootstrap-carousel