carouFredSel responsive height

前端 未结 14 713
一整个雨季
一整个雨季 2021-01-30 11:46

i am having height problems of my responsive carousel using carouFredSel.

since the images are responsive and the carousel is also set to responsive.

It still ad

14条回答
  •  醉酒成梦
    2021-01-30 12:23

    I had an issue in carouFredsel 6.2.0 where the wrapper that's created updated it's height OK when given height:'variable' in the config, but the actual list of items would be stuck with the height of the first item. This then cropped off any subsequent items that were taller than the first. The updateSizes trigger didn't seem to do anything, so I solved it using the onAfter event;

    scroll : {
      onAfter : function( data ) {          
        var carousel_height = $(this).parents('.caroufredsel_wrapper').css('height');
        $(this).css('height', carousel_height);
      }
     }
    

提交回复
热议问题