jquery - bootstrap carousel jump how to find height but not fixed -


i using bootstrap carousel, notice jump when next slide show.

since want responsive, can't set fixed height.

var $carousel_height = $('#mycarousel .item img').outerheight(); var $carousel_height2 = $('#mycarousel .item img').css("height"); console.log($carousel_height );      console.log($carousel_height2 );  $('#mycarousel').css('height', $carousel_height2);//apply 

i kind of use above codes, both give me 0px, believe because set width 100% image tag.

so there way set height equal first slide height? or other way not jump?

thanks,


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -