Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix duplication DOM issue #99

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion README.markdown
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
accessible-slick
----------------

## Web note:

As seen in [WEBPLT-9816](https://jira.mercatus.com/browse/WEBPLT-9816) - event listeners are being removed by the **Slick.prototype.cleanUpRows** function on breakpoints. As such, the function has been changed to the code below as described in [this StackOverflow thread](https://stackoverflow.com/questions/38183104/how-to-prevent-slick-plugin-from-removing-event-listeners)

```JavaScript
Slick.prototype.cleanUpRows = function() {
var _ = this, originalSlides;

if(_.options.rows > 0) {
originalSlides = _.$slides.children().children().clone(true);
originalSlides.removeAttr('style');
_.$slider.get(0).innerHTML = '';
_.$slider.append(originalSlides);
}
};
```

_the last (accessible) carousel you'll ever need_

A highly accessible, WCAG 2.0 / 2.1 compliant, drop-in replacement for Slick Slider (1.8.1) intended to make life easier for real-world dev teams who need to pass accessibility audits.
Expand Down Expand Up @@ -197,4 +214,4 @@ Massive kudos to [Ken Wheeler](https://github.com/kenwheeler) and the entire [Sl

This fork was started by [Jason Webb](https://github.com/jasonwebb), Developer Advocate at <a href="https://accessible360.com" target="_blank">Accessible360</a>.

<a href="https://accessible360.com" target="_blank"><img src="https://raw.githubusercontent.com/Accessible360/accessible-slick/master/docs/images/accessible360-logo.png" alt="Accessible360 logo with tagline Better. For All." width="400"></a>
<a href="https://accessible360.com" target="_blank"><img src="https://raw.githubusercontent.com/Accessible360/accessible-slick/master/docs/images/accessible360-logo.png" alt="Accessible360 logo with tagline Better. For All." width="400"></a>
5 changes: 3 additions & 2 deletions slick/slick.js
Original file line number Diff line number Diff line change
Expand Up @@ -888,9 +888,10 @@
var _ = this, originalSlides;

if(_.options.rows > 0) {
originalSlides = _.$slides.children().children();
originalSlides = _.$slides.children().children().clone(true);
originalSlides.removeAttr('style');
_.$slider.empty().append(originalSlides);
_.$slider.get(0).innerHTML = '';
_.$slider.append(originalSlides);
}

};
Expand Down
2 changes: 1 addition & 1 deletion slick/slick.min.js

Large diffs are not rendered by default.