Socket
Socket
Sign inDemoInstall

harummaiores

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    harummaiores

the last carousel you'll ever need


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

slick

the last carousel you'll ever need

Demo

http://kenwheeler.github.io/slick

CDN

CDN hosted slick is a great way to get set up quick:

In your <head> add:

<link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/jquery.slick/1.3.8/slick.css"/>

Then, before your closing <body> tag add:

<script type="text/javascript" src="//cdn.jsdelivr.net/jquery.slick/1.3.8/slick.min.js"></script>
Bower
bower install --save slick.js
Options
OptionTypeDefaultDescription
accessibilitybooleantrueEnables tabbing and arrow key navigation
autoplaybooleanfalseEnables auto play of slides
autoplaySpeedint3000Auto play change interval
centerModebooleanfalseEnables centered view with partial prev/next slides. Use with odd numbered slidesToShow counts.
centerPaddingstring'50px'Side padding when in center mode. (px or %)
cssEasestring'ease'CSS3 easing
customPagingfunctionn/aCustom paging templates. See source for use example.
dotsbooleanfalseCurrent slide indicator dots
dotsClassstring'slick-dots'Class for slide indicator dots container
draggablebooleantrueEnables desktop dragging
easingstring'linear'animate() fallback easing
fadebooleanfalseEnables fade
arrowsbooleantrueEnable Next/Prev arrows
appendArrowsstring$(element)Change where the navigation arrows are attached (Selector, htmlString, Array, Element, jQuery object)
appendDotsstring$(element)Change where the navigation dots are attached (Selector, htmlString, Array, Element, jQuery object)
prevArrowstring (htmljQuery selector)object (DOM node
nextArrowstring (htmljQuery selector)object (DOM node
infinitebooleantrueInfinite looping
lazyLoadstring'ondemand'Accepts 'ondemand' or 'progressive' for lazy load technique
onBeforeChange(this, currentIndex,targetIndex)methodnullBefore slide change callback
onAfterChange(this, index)methodnullAfter slide change callback
onInit(this)methodnullWhen Slick initializes for the first time callback
onReInit(this)methodnullEvery time Slick (re-)initializes callback
pauseOnHoverbooleantruePauses autoplay on hover
pauseOnDotsHoverbooleanfalsePauses autoplay when a dot is hovered
responsiveobjectnullBreakpoint triggered settings
slidestring'div'Slide element query
slidesToShowint1# of slides to show at a time
slidesToScrollint1# of slides to scroll at a time
speedint300Transition speed
swipebooleantrueEnables touch swipe
swipeToSlidebooleanfalseSwipe to slide irrespective of slidesToScroll
touchMovebooleantrueEnables slide moving with touch
touchThresholdint5To advance slides, the user must swipe a length of (1/touchThreshold) * the width of the slider.
useCSSbooleantrueEnable/Disable CSS Transitions
variableWidthbooleanfalseDisables automatic slide width calculation
verticalbooleanfalseVertical slide direction
rtlbooleanfalseChange the slider's direction to become right-to-left
waitForAnimatebooleantrueIgnores requests to advance the slide while animating
Methods
MethodArgumentDescription
slick()options : objectInitializes Slick
unslick()Destroys Slick
slickNext()Triggers next slide
slickPrev()Triggers previous slide
slickPause()Pause Autoplay
slickPlay()Start Autoplay
slickGoTo()index : intGoes to slide by index
slickCurrentSlide()Returns the current slide index
slickAdd()element : html or DOM object, index: int, addBefore: boolAdd 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
slideRemove()index: int, removeBefore: boolRemove 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()filter : selector or functionFilters slides using jQuery .filter syntax
slickUnfilter()Removes applied filter
slickGetOption(option)option : string(option name)Gets an option value.
slickSetOption(option,value,refresh)option : string(option name), value : depends on option, refresh : booleanSets an option live. Set refresh to true if it is an option that changes the display
Example

Initialize with:

$(element).slick({
  dots: true,
  speed: 500
});

Destroy with:

$(element).unslick();
Sass Variables
VariableTypeDefaultDescription
$slick-font-pathstring"./fonts/"Directory path for the slick icon font
$slick-font-familystring"slick"Font-family for slick icon font
$slick-loader-pathstring"./"Directory path for the loader image
$slick-arrow-colorcolorwhiteColor of the left/right arrow icons
$slick-dot-colorcolorblackColor of the navigation dots
$slick-dot-color-activecolor$slick-dot-colorColor of the active navigation dot
$slick-prev-characterstring'\2190'Unicode character code for the previous arrow icon
$slick-next-characterstring'\2192'Unicode character code for the next arrow icon
$slick-dot-characterstring'\2022'Unicode character code for the navigation dot icon
$slick-dot-sizepixels6pxSize of the navigation dots
Dependencies

jQuery 1.7

License

Copyright (c) 2014 Ken Wheeler

Licensed under the MIT license.

Free as in Bacon.

Keywords

FAQs

Last updated on 01 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc