Skip to content

Instantly share code, notes, and snippets.

@proweb
Created May 6, 2017 16:30
Show Gist options
  • Select an option

  • Save proweb/7c872c02646659e45084c1d51dfc3018 to your computer and use it in GitHub Desktop.

Select an option

Save proweb/7c872c02646659e45084c1d51dfc3018 to your computer and use it in GitHub Desktop.

Revisions

  1. proweb created this gist May 6, 2017.
    8 changes: 8 additions & 0 deletions equalheightslick.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    $(window).load(function() {
    $('.slides').on('setPosition', function () {
    $(this).find('.slick-slide').height('auto');
    var slickTrack = $(this).find('.slick-track');
    var slickTrackHeight = $(slickTrack).height();
    $(this).find('.slick-slide').css('height', slickTrackHeight + 'px');
    });
    })