Last active
January 10, 2023 13:12
-
-
Save yuliyang/bdd7d20cb1a43f94dc8050792e607a9a to your computer and use it in GitHub Desktop.
[ Elementor ] Slick Slider + Elementor Loop Grid
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
<!-- add a HTML widget --> | |
<link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/npm/[email protected]/slick/slick.css"/> | |
<link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/npm/[email protected]/slick/slick-theme.css"/> | |
<script type="text/javascript" src="//cdn.jsdelivr.net/npm/[email protected]/slick/slick.min.js"></script> | |
<script> | |
jQuery(document).ready(function(){ | |
jQuery('.ds-slick-slide .elementor-loop-container').slick({ | |
centerMode: true, | |
centerPadding: '0', | |
slidesToShow: 3, | |
slidesToScroll: 1, | |
prevArrow: '<button type="button" class="slick-prev"><i class="fas fa-chevron-left"></i></button>', | |
nextArrow: '<button type="button" class="slick-next"><i class="fas fa-chevron-right"></i></button>' | |
}); | |
// remove Elementor loop style so it won't become a slide | |
jQuery('.ds-slick-slide.first-loop .elementor-loop-container').slick('slickRemove', 0); | |
}); | |
</script> |
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
<!-- add another HTML widget --> | |
<!-- paste in loop grid widget's style --> |
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
<!-- Elementor loop grid widget --> | |
<div class="elementor-loop-container"> | |
<style> | |
<!-- Elementor loop style --> | |
</style> | |
<div class="e-loop-item"> | |
<!-- Loop content --> | |
</div> | |
<div class="e-loop-item"> | |
<!-- Loop content --> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment