twbs / bootstrap

The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.
https://getbootstrap.com
MIT License
170.95k stars 78.89k forks source link

Carousel buttons stopped working #15308

Closed ryanstua closed 9 years ago

ryanstua commented 9 years ago

Hi I've updated to the most recent version of Bootstrap.

I've been working on a website where I had a button that would link to a modal. In the modal body I had built a carousel that had buttons and it would scroll through the images no problem.

This now does now work and I don't know why. Does anyone have an explanation?

ryanstua commented 9 years ago

Here is the code:

cvrebert commented 9 years ago

@ryanstua Please post a JS Fiddle or JS Bin of your example. Also, what version of Bootstrap did you upgrade from?

ryanstua commented 9 years ago

http://jsfiddle.net/ryanstua/cmc7v7q0/

I think i updated from version 3.1

cvrebert commented 9 years ago

After removing large amounts of irrelevant markup and doing minor tweaks: http://jsfiddle.net/vr0s5fny/1/

cvrebert commented 9 years ago

Let's try that one more time now that LMVTFY is back online: http://jsfiddle.net/ryanstua/cmc7v7q0/

twbs-lmvtfy commented 9 years ago

Hi @cvrebert!

You appear to have posted a live example (http://fiddle.jshell.net/ryanstua/cmc7v7q0/show/light/), which is always a good first step. However, according to the HTML5 validator, your example has some validation errors, which might potentially be causing your issue:

You'll need to fix these errors and post a revised example before we can proceed further. Thanks!

(Please note that this is a fully automated comment.)

cvrebert commented 9 years ago

And for the somewhat cleaned-up version?: http://jsfiddle.net/vr0s5fny/1/

twbs-lmvtfy commented 9 years ago

Hi @cvrebert!

You appear to have posted a live example (http://fiddle.jshell.net/vr0s5fny/1/show/light/), which is always a good first step. However, according to the HTML5 validator, your example has some validation errors, which might potentially be causing your issue:

You'll need to fix these errors and post a revised example before we can proceed further. Thanks!

(Please note that this is a fully automated comment.)

ryanstua commented 9 years ago

Thanks guys - however the buttons attached to the carousels on the modals which appear on the take tour button do not scroll the images next/prev?

cvrebert commented 9 years ago

Fixed stray </div>: http://jsfiddle.net/vr0s5fny/2/

twbs-lmvtfy commented 9 years ago

Hi @cvrebert!

You appear to have posted a live example (http://fiddle.jshell.net/vr0s5fny/2/show/light/), which is always a good first step. However, according to Bootlint, your example has some Bootstrap usage errors, which might potentially be causing your issue:

You'll need to fix these errors and post a revised example before we can proceed further. Thanks!

(Please note that this is a fully automated comment.)

cvrebert commented 9 years ago

After (for simplicity) removing the misplaced stray modal-footers: http://jsfiddle.net/vr0s5fny/3/

cvrebert commented 9 years ago

Aha! Your hrefs are using the ID of your <div class="modal"> instead of the ID of the <div class="carousel"> like they're supposed to.

ryanstua commented 9 years ago

Thanks, are you able to provide an example?

cvrebert commented 9 years ago

Nope, spent enough time on this already.