Using the Slick Slides library
CGU Core uses the Slick Slides library to build carousels. There’s a carousel framework already in place with CGU Core for easily creating custom carousels.
If, for some reason, you want to use the library in another way, here’s a brief rundown on using the Slick:
<ul id="my-carousel"> <li><img src="//unsplash.it/1000/500/?image=1068" width="1000" height="500" alt="placeholder" /></li> <li><img src="//unsplash.it/1000/500/?image=1069" width="1000" height="500" alt="placeholder" /></li> <li><img src="//unsplash.it/1000/500/?image=1070" width="1000" height="500" alt="placeholder" /></li> </ul> <script type="text/javascript"> jQuery('#my-carousel').slick({ autoplay: true, autoplaySpeed: 2000, dots: true, arrows: false }); </script>
Alternatively, you can provide a JSON options object to an element with the data-slick
attribute:
<ul id="my-carousel" data-slick='{ "autoplay":true, "autoplaySpeed":2000, "dots":true, "arrows":false }'>