diff --git a/README.markdown b/README.markdown index 6dc5ca048..765ab78b6 100644 --- a/README.markdown +++ b/README.markdown @@ -17,19 +17,21 @@ to serve the files as close, and fast as possible to your users: - https://cdnjs.com/libraries/slick-carousel - https://www.jsdelivr.com/projects/jquery.slick -#####Example using jsDelivr +##### Example using jsDelivr Just add a link to the css file in your ``: + ```html - - + + + ``` Then, before your closing `````` tag add: ```html - + ``` #### Package Managers @@ -67,8 +69,12 @@ Example: Option | Type | Default | Description ------ | ---- | ------- | ----------- -accessibility | boolean | true | Enables tabbing and arrow key navigation +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. @@ -81,25 +87,25 @@ 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 -arrows | boolean | true | Enable Next/Prev arrows -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) -mobileFirst | boolean | false | Responsive settings use mobile first calculation -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. +focusOnSelect | boolean | false | Enable focus on selected element (click) +focusOnChange | boolean | false | Puts focus on slide after change infinite | boolean | true | Infinite looping initialSlide | integer | 0 | Slide to start on lazyLoad | string | 'ondemand' | Accepts 'ondemand' or 'progressive' for lazy load technique. 'ondemand' will load the image as soon as you slide to it, 'progressive' loads one image after the other when the page loads. +mobileFirst | boolean | false | Responsive settings use mobile first calculation +nextArrow | string (html \| jQuery selector) \| object (DOM node \| jQuery object) | `` | Allows you to select a node or customize the HTML for the "Next" arrow. +pauseOnDotsHover | boolean | false | Pauses autoplay when a dot is hovered pauseOnFocus | boolean | true | Pauses autoplay when slider is focussed pauseOnHover | boolean | true | Pauses autoplay on hover -pauseOnDotsHover | boolean | false | Pauses autoplay when a dot is hovered +prevArrow | string (html \| jQuery selector) \| object (DOM node \| jQuery object) | `` | Allows you to select a node or customize the HTML for the "Previous" arrow. respondTo | string | 'window' | Width that responsive object responds to. Can be 'window', 'slider' or 'min' (the smaller of the two). responsive | array | null | Array of objects [containing breakpoints and settings objects (see example)](#responsive-option-example). Enables settings at given `breakpoint`. 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. +rtl | boolean | false | Change the slider's direction to become right-to-left slide | string | '' | Slide element query slidesPerRow | int | 1 | With grid mode initialized via the rows option, this sets how many slides are in each grid row. -slidesToShow | int | 1 | # of slides to show at a time slidesToScroll | int | 1 | # of slides to scroll at a time +slidesToShow | int | 1 | # of slides to show at a time speed | int | 300 | Transition speed swipe | boolean | true | Enables touch swipe swipeToSlide | boolean | false | Swipe to slide irrespective of slidesToScroll @@ -110,7 +116,6 @@ useTransform | boolean | true | Enable/Disable CSS Transforms variableWidth | boolean | false | Disables automatic slide width calculation vertical | boolean | false | Vertical slide direction verticalSwiping | boolean | false | Changes swipe direction to vertical -rtl | boolean | false | Change the slider's direction to become right-to-left waitForAnimate | boolean | true | Ignores requests to advance the slide while animating zIndex | number | 1000 | Set the zIndex values for slides, useful for IE9 and lower @@ -280,7 +285,7 @@ jQuery 1.7 #### License -Copyright (c) 2014 Ken Wheeler +Copyright (c) 2017 Ken Wheeler Licensed under the MIT license. diff --git a/component.json b/component.json index af23f0078..df1900c24 100644 --- a/component.json +++ b/component.json @@ -2,7 +2,7 @@ "name": "slick", "repo": "kenwheeler/slick", "description": "the last carousel you'll ever need", - "version": "1.6.0", + "version": "1.8.1", "keywords": ["ui", "jquery", "carousel", "responsive", "slider"], "dependencies": { "component/jquery": "*" diff --git a/index.html b/index.html index 761bebfd2..2e7e57555 100644 --- a/index.html +++ b/index.html @@ -30,12 +30,190 @@ .slick-prev:before, .slick-next:before { - color: black; + color: black; + } + + + .slick-slide { + transition: all ease-in-out .3s; + opacity: .2; + } + + .slick-active { + opacity: .5; + } + + .slick-current { + opacity: 1; } +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
@@ -134,6 +312,38 @@ + - \ No newline at end of file + diff --git a/package.json b/package.json index 8f675a401..1ad1f308e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "slick-carousel", - "version": "1.6.0", + "version": "1.8.1", "description": "the last carousel you'll ever need", "main": "slick/slick.js", "repository": { @@ -44,7 +44,7 @@ "bugs": { "url": "https://github.com/kenwheeler/slick/issues" }, - "dependencies": { - "jquery": ">=1.7.2" + "peerDependencies": { + "jquery": ">=1.8.0" } } diff --git a/slick.jquery.json b/slick.jquery.json index 7af760b47..8c3ce75cf 100644 --- a/slick.jquery.json +++ b/slick.jquery.json @@ -9,7 +9,7 @@ "touch", "mobile" ], - "version": "1.6.0", + "version": "1.8.1", "author": { "name": "Ken Wheeler", "url": "http://kenwheeler.github.io" diff --git a/slick/slick-theme.less b/slick/slick-theme.less index 8f1075861..e06fc183d 100644 --- a/slick/slick-theme.less +++ b/slick/slick-theme.less @@ -21,18 +21,7 @@ background: #fff url('@{slick-loader-path}ajax-loader.gif') center center no-repeat; } -/* Icons */ -@font-face{ - font-family: 'slick'; - font-weight: normal; - font-style: normal; - - src: url('@{slick-font-path}slick.eot'); - src: url('@{slick-font-path}slick.eot?#iefix') format('embedded-opentype'), url('@{slick-font-path}slick.woff') format('woff'), url('@{slick-font-path}slick.ttf') format('truetype'), url('@{slick-font-path}slick.svg#slick') format('svg'); -} - /* Arrows */ - .slick-prev, .slick-next { position: absolute; @@ -72,17 +61,28 @@ opacity: @slick-opacity-default; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; + + & when ( @slick-font-family = 'slick' ) { + /* Icons */ + @font-face { + font-family: 'slick'; + font-weight: normal; + font-style: normal; + src: url('@{slick-font-path}slick.eot'); + src: url('@{slick-font-path}slick.eot?#iefix') format('embedded-opentype'), url('@{slick-font-path}slick.woff') format('woff'), url('@{slick-font-path}slick.ttf') format('truetype'), url('@{slick-font-path}slick.svg#slick') format('svg'); + } + } } .slick-prev { left: -25px; - &[dir="rtl"] { + [dir="rtl"] & { left: auto; right: -25px; } &:before { content: @slick-prev-character; - &[dir="rtl"] { + [dir="rtl"] & { content: @slick-next-character; } } @@ -90,13 +90,13 @@ .slick-next { right: -25px; - &[dir="rtl"] { + [dir="rtl"] & { left: -25px; right: auto; } &:before { content: @slick-next-character; - &[dir="rtl"] { + [dir="rtl"] & { content: @slick-prev-character; } } diff --git a/slick/slick.css b/slick/slick.css index dd973fedf..57477e848 100644 --- a/slick/slick.css +++ b/slick/slick.css @@ -55,6 +55,8 @@ left: 0; display: block; + margin-left: auto; + margin-right: auto; } .slick-track:before, .slick-track:after diff --git a/slick/slick.js b/slick/slick.js index 57898033a..7aca6136d 100644 --- a/slick/slick.js +++ b/slick/slick.js @@ -6,7 +6,7 @@ |___/_|_|\___|_|\_(_)/ |___/ |__/ - Version: 1.6.0 + Version: 1.8.1 Author: Ken Wheeler Website: http://kenwheeler.github.io Docs: http://kenwheeler.github.io/slick @@ -15,7 +15,7 @@ */ /* global window, document, define, jQuery, setInterval, clearInterval */ -(function(factory) { +;(function(factory) { 'use strict'; if (typeof define === 'function' && define.amd) { define(['jquery'], factory); @@ -44,15 +44,15 @@ appendDots: $(element), arrows: true, asNavFor: null, - prevArrow: '', - nextArrow: '', + prevArrow: '', + nextArrow: '', autoplay: false, autoplaySpeed: 3000, centerMode: false, centerPadding: '50px', cssEase: 'ease', customPaging: function(slider, i) { - return $('',nextArrow:'',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(b,c){return a('',nextArrow:'',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,t){return i('