GithubHelp home page GithubHelp logo

cdoru / slick Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kenwheeler/slick

0.0 2.0 0.0 1.87 MB

the last carousel you'll ever need

Home Page: kenwheeler.github.io/slick

License: MIT License

slick's Introduction

slick

the last carousel you'll ever need

Demo

http://kenwheeler.github.io/slick

Options

Option Type Default Description
accessibility boolean true Enables tabbing and arrow key navigation
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 int 50 Side padding when in center mode.
cssEase string 'ease' CSS3 easing
dots boolean false Current slide indicator dots
draggable boolean true Enables desktop dragging
easing string 'linear' animate() fallback easing
fade boolean false Enables fade
arrows boolean true Enable Next/Prev arrows
infinite boolean true Infinite looping
lazyLoad string 'ondemand' Accepts 'ondemand' or 'progressive' for lazy load technique
onBeforeChange(this, index) method null Before slide change callback
onAfterChange(this, index) method null After slide change callback
onInit(this) method null When Slick initializes for the first time callback
onReInit(this) method null Every time Slick (re-)initializes callback
pauseOnHover boolean true Pauses autoplay on hover
placeholders boolean true Enable placeholders to enforce slidesToScroll with uneven slide counts (Doesn't work with infinite: true)
responsive object null Breakpoint triggered settings
slide string 'div' Slide element query
slidesToShow int 1 # of slides to show at a time
slidesToScroll int 1 # of slides to scroll at a time
speed int 300 Transition speed
swipe boolean true Enables touch swipe
touchMove boolean true Enables slide moving with touch
touchMoveThreshold int 5 Swipe distance threshold
vertical boolean false Vertical slide direction

Methods

Method Argument Description
slick() options : object Initializes Slick
unslick() Destroys Slick
slickNext() Triggers next slide
slickPrev() Triggers previous slide
slickPause() Pause Autoplay
slickPlay() Start Autoplay
slickGoTo() index : int Goes to slide by index
slickAdd() element : html or DOM object, index: int, addBefore: bool 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
slideRemove() index: int, removeBefore: bool 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() filter : selector or function Filters slides using jQuery .filter syntax
slickUnfilter() Removes applied filter
slickSetOption(option,value,refresh) option : string(option name), value : depends on option, refresh : boolean Sets 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();

Dependencies

jQuery 1.7

License

Copyright (c) 2014 Ken Wheeler

Licensed under the MIT license.

Free as in Bacon.

slick's People

Contributors

kenwheeler avatar gflateman avatar austinpray avatar mchunkytrunk avatar natewiley avatar umbrae avatar efoxepstein avatar gseguin avatar james2doyle avatar jamestenglish avatar jsonau avatar mhm5000 avatar robinboehm avatar xat avatar badlamer avatar alexsomeoddpilot avatar benib avatar

Watchers

Doru Cioclea avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.