Skip to content

Commit

Permalink
Added the ability to allow more than one class on elements (leongerse…
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonioLeutsch authored Mar 27, 2020
1 parent 0b9328a commit 54bea61
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions documentation/more/classes.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ noUiSlider.create(slider, {
cssClasses: {
// Full list of classnames to override.
// Does NOT extend the default classes.
// The First Class in String gets prefixed, the rest gets added as it is
// Have a look at the source for the full, current list:
// https://github.com/leongersen/noUiSlider/blob/master/src/nouislider.js#L880
}
Expand Down
2 changes: 1 addition & 1 deletion src/nouislider.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@

// http://youmightnotneedjquery.com/#add_class
function addClass(el, className) {
if (el.classList) {
if (el.classList && !/\s/.test(className)) {
el.classList.add(className);
} else {
el.className += " " + className;
Expand Down

0 comments on commit 54bea61

Please sign in to comment.