Slick

Slick logotyp

Webbplats

Github.io Ken Wheeler Slick Logotyp för Slick - the last carousel you'll ever need

Citat

The last carousel you'll ever need

URL för CSS

//cdn.jsdelivr.net/jquery.slick/1.5.7/slick.css //cdn.jsdelivr.net/jquery.slick/1.5.7/slick-theme.css

URL för JavaScript

//cdn.jsdelivr.net/jquery.slick/1.5.7/slick.min.js

Inställningar

Setting Type Default Description
accessibility boolean true Enables tabbing and arrow key navigation
adaptiveHeight boolean false Enables adaptive height for single slide horizontal carousels.
autoplay boolean false Enables Autoplay
autoplaySpeed int(ms) 3000 Autoplay Speed in milliseconds
arrows boolean true Prev/Next Arrows
asNavFor string null Set the slider to be the navigation of other slider (Class or ID Name)
appendArrows string $(element) Change where the navigation arrows are attached (Selector, htmlString, Array, Element, jQuery object)
prevArrow string (html|jQuery selector) | object (DOM node|jQuery object) Allows you to select a node or customize the HTML for the "Previous" arrow.
nextArrow string (html|jQuery selector) | object (DOM node|jQuery object) Allows you to select a node or customize the HTML for the "Next" arrow.
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 Animation Easing
customPaging function n/a Custom paging templates. See source for use example.
dots boolean false Show dot indicators
draggable boolean true Enable mouse dragging
fade boolean false Enable fade
focusOnSelect boolean false Enable focus on selected element (click)
easing string 'linear' Add easing for jQuery animate. Use with easing libraries or default easing methods
edgeFriction integer 0.15 Resistance when swiping edges of non-infinite carousels
infinite boolean true Infinite loop sliding
initialSlide integer 0 Slide to start on
lazyLoad string 'ondemand' Set lazy loading technique. Accepts 'ondemand' or 'progressive'
mobileFirst boolean false Responsive settings use mobile first calculation
pauseOnHover boolean true Pause Autoplay On Hover
pauseOnDotsHover boolean false Pause Autoplay when a dot is hovered
respondTo string 'window' Width that responsive object responds to. Can be 'window', 'slider' or 'min' (the smaller of the two)
responsive object none Object containing breakpoints and settings objects (see demo). Enables settings sets at given screen width. Set settings to "unslick" instead of an object to disable slick at a given breakpoint.
rows int 1 Setting this to more than 1 initializes grid mode. Use slidesPerRow to set how many slides should be in each row.
slide element '' Element query to use as slide
slidesPerRow int 1 With grid mode intialized via the rows option, this sets how many slides are in each grid row. dver
slidesToShow int 1 # of slides to show
slidesToScroll int 1 # of slides to scroll
speed int(ms) 300 Slide/Fade animation speed
swipe boolean true Enable swiping
swipeToSlide boolean false Allow users to drag or swipe directly to a slide irrespective of slidesToScroll
touchMove boolean true Enable slide motion with touch
touchThreshold int 5 To advance slides, the user must swipe a length of (1/touchThreshold) * the width of the slider
useCSS boolean true Enable/Disable CSS Transitions
variableWidth boolean false Variable width slides
vertical boolean false Vertical slide mode
verticalSwiping boolean false Vertical swipe mode
rtl boolean false Change the slider's direction to become right-to-left

Events

Event Arguments Description
afterChange slick, currentSlide Fires after slide change
beforeChange slick, currentSlide, nextSlide Fires before slide change
edge slick, direction Fires when an edge is overscrolled in non-infinite mode.
init slick Fires after first initialization.
reInit slick Fires after every re-initialization
setPosition slick Fires after position/size changes
swipe slick, direction Fires after swipe/drag

Method

Method Arguments Description
slickCurrentSlide none Returns the current slide index
slickGoTo int : slide number, boolean: should animate Navigates to a slide by index
slickNext none Navigates to the next slide
slickPrev none Navigates to the previous slide
slickPause none Pauses autoplay
slickPlay none Starts autoplay
slickAdd html or DOM object, index, addBefore Add a slide. If an index is provided, will add at that index, or before if addBefore is set. If no index is provided, add to the end or to the beginning if addBefore is set. Accepts HTML String || Object
slickRemove index, removeBefore Remove slide by index. If removeBefore is set true, remove slide preceding index, or the first slide if no index is specified. If removeBefore is set to false, remove the slide following index, or the last slide if no index is set.
slickFilter Selector or Function Filters slides using jQuery .filter()
slickUnfilter index Removes applied filtering
slickGetOption option : string Gets an individual option value.
slickSetOption option : string, value : depends on option, refresh : boolean Sets an individual value live. Set refresh to true if it's a UI update.
unslick none Deconstructs slick
getSlick none Get Slick Object

Liknande

Slack logotyp

Liknande namn

jQuery logotyp

Ramverk

Programmeringsspråk

Github logotyp

Externa länkar