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
Post a Comment