28,522
stars
+-2+-1+-3
5,706
forks
–
watchers
–
prs
–
issues
–
releases
–
discussions
README
slick ------- [1]: _the last carousel you'll ever need_ Version 2.0 Version 2.0 is compatible with jQuery 4. Demo http://kenwheeler.github.io/slick CDN To start working with Slick right away, there's a couple of CDN choices available to serve the files as close, and fast as possible to your users: - https://cdnjs.com/libraries/slick-carousel - https://cdn.jsdelivr.net/gh/kenwheeler/slick/ Example using from jsDelivr Just add a link to the css file in your . If you are using jQuery 4.0 or higher, use the following: html Then, before your closing tag add: html If you are using jQuery 3.0 or lower, use the following: html Then, before your closing tag add: html Package Managers sh Bower bower install --save slick-carousel NPM npm install slick-carousel Contributing PLEASE review CONTRIBUTING.markdown prior to requesting a feature, filing a pull request or filing an issue. Data Attribute Settings In slick 1.5 you can now add settings using the data-slick attribute. You still need to call $(element).slick() to initialize slick on the element. Example: html 1 2 3 4 5 6 Settings Option | Type | Default | Description ------ | ---- | ------- | ----------- accessibility | boolean | true | Enables tabbing and arrow key navigation. Unless autoplay: true, sets browser focus to current slide (or first of current slide set, if multiple slidesToShow) after slide change. For full a11y compliance enable focusOnChange in addition to this. adaptiveHeight | boolean | false | Adapts slider height to the current slide appendArrows | string | $(element) | Change where the navigation arrows are attached (Selector, htmlString, Array, Element, jQuery object) appendDots | string | $(element) | Change where the navigation dots are attached (Selector, htmlString, Array, Element, jQuery object) arrows | boolean | true | Enable Next/Prev arrows asNavFor | string | $(element) | Enables syncing of multiple sliders autoplay | boolean | false | Enables auto play of slides autoplaySpeed | int | 3000 | Auto play change interval centerMode | boolean | false | Enables centered view with partial prev/next slides. Use with odd numbered slidesToShow counts. centerPadding | string | '50px' | Side padding when in center mode. (px or %) cssEase | string | 'ease' | CSS3 easing customPaging | function | n/a | Custom paging templates. See source for use example. dots | boolean | false | Current slide indicator dots dotsClass | string | 'slick-dots' | Class for slide indicator dots container draggable | boolean | true | Enables desktop dragging easing | string | 'linear' | animate() fallback easing edgeFriction | integer | 0.15 | Resistance when swiping edges of non-infinite carousels fade | boolean | false | Enables fade focusOnSelect | boolean | false | Enable focus on selected element (click) focusOnChange | boolean | false | Puts focus on slide after change infinite | boolean | true | Infinite looping initialSlide | in