Last active
August 25, 2016 10:17
-
-
Save WilliamIsted/b004b0c142747b8a9980f80205ca1bb7 to your computer and use it in GitHub Desktop.
Fix for when a slider has broken positioning from being previously hidden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(function($) { | |
$(document).on( 'click', '.tab', function() { | |
$('.slick') | |
.find('.news-item') | |
.css({ height: '' }) // Remove the height calculated when hidden | |
.find('.news-item__title') | |
.css({ height: '' }); // Remove the height calculated when hidden | |
$('.slick').slick('getSlick').checkResponsive(); // Trigger same internal functions as `orientationchange` event. | |
$('.slick').slick('getSlick').setPosition(); // Trigger same internal functions as `orientationchange` event. | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment