Created
January 13, 2017 09:27
-
-
Save patric-boehner/a7f8c382f20b58a944ad956b182c0623 to your computer and use it in GitHub Desktop.
Slick Slider Don't Show Till Loaded and Fade In
This file contains hidden or 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
| var $slider = $('.homepage-slidehsow') | |
| .on('init', function(slick) { | |
| // Just checking if its running | |
| console.log('fired!'); | |
| // Fade in containing element for slick slider | |
| $('.homepage-slidehsow').fadeIn(900); | |
| }) | |
| // Whatever settings you want | |
| .slick({ | |
| infinite: true, | |
| speed: 300, | |
| slidesToShow: 1, | |
| centerMode: true, | |
| variableWidth: true, | |
| lazyLoad: 'ondemand', | |
| autoplay: true, | |
| autoplaySpeed: 7000, | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment