noreiller / bootstrap-modal-carousel

A set of plugins to display a carousel into a fullscreen modal box
http://noreiller.github.com/bootstrap-modal-carousel
MIT License
128 stars 63 forks source link

Having the slideshow initially hidden #12

Closed faridjame closed 9 years ago

faridjame commented 10 years ago

Is it possible to have the carousel initially hidden and just display it within the modal after a button/link is clicked?

I tried setting the display to none for the carousel, but the modal fails to show it if the carousel is initially hidden.

Thanks

noreiller commented 10 years ago

Hi, can you provide your code or a JsFiddle please ?

faridjame commented 10 years ago

Sure, I will, but in the meantime, you can see it in action on my website towards the bottom, click on "Versa Cam"

noreiller commented 10 years ago

I can't find it, sorry.

saffront commented 8 years ago

Use this bit of jquery to solve your issue:

$('#myModal').on('shown.bs.modal', function () {
      $('#myCarousel').removeClass('hidden');
    })

    $('#myModal').on('hidden.bs.modal', function () {
      $('#myCarousel').addClass('hidden');
    })