-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3032 from leggomuhgreggo/focusOnChange
Added option to enable focus on slide change
- Loading branch information
Showing
2 changed files
with
20 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,8 +20,8 @@ to serve the files as close, and fast as possible to your users: | |
##### Example using jsDelivr | ||
|
||
Just add a link to the css file in your `<head>`: | ||
```html | ||
|
||
```html | ||
<link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/gh/kenwheeler/[email protected]/slick/slick.css"/> | ||
<!-- Add the slick-theme.css if you want default styling --> | ||
<link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/gh/kenwheeler/[email protected]/slick/slick-theme.css"/> | ||
|
@@ -68,8 +68,12 @@ Example: | |
|
||
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. | ||
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. | ||
|
@@ -82,25 +86,24 @@ 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) | `<button type="button" class="slick-prev">Previous</button>` | Allows you to select a node or customize the HTML for the "Previous" arrow. | ||
nextArrow | string (html \| jQuery selector) \| object (DOM node \| jQuery object) | `<button type="button" class="slick-next">Next</button>` | Allows you to select a node or customize the HTML for the "Next" arrow. | ||
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) | `<button type="button" class="slick-next">Next</button>` | 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) | `<button type="button" class="slick-prev">Previous</button>` | 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 | ||
|
@@ -111,7 +114,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 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters