Skip to content

Commit

Permalink
docs for cssClasses
Browse files Browse the repository at this point in the history
  • Loading branch information
leongersen committed Apr 24, 2016
1 parent 0b8bedc commit 3971cd9
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion documentation/download.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<p>noUiSlider is open source, and you can use it <strong>for free</strong> in any personal or commercial product. No attribution required. Both the uncompressed and compressed version of noUiSlider are available in a <code>.zip</code> release, which is hosted by Github and available over <code>https</code>.</p>

<a class="button" href="https://github.com/leongersen/noUiSlider/releases/download/8.4.0/noUiSlider.8.4.0.zip" data-category="convert" data-action="download">Download noUiSlider from Github</a>
<a class="button" href="https://github.com/leongersen/noUiSlider/releases/download/8.5.0/noUiSlider.8.5.0.zip" data-category="convert" data-action="download">Download noUiSlider from Github</a>

<div class="share">
<iframe src="https://ghbtns.com/github-btn.html?user=leongersen&repo=noUiSlider&type=star&count=true&size=large" frameborder="0" scrolling="0" width="160px" height="30px"></iframe>
Expand Down
8 changes: 8 additions & 0 deletions documentation/more.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@
<div class="view">
<p>Styling noUiSlider is easy. The default stylesheet contains helpful comments to get a head start. I <strong>strongly</strong> recommend using the default stylesheet as a starting point when re-styling noUiSlider.</p>

<p>If your styling system doesn't match the convention in noUiSlider, you can use the <code>cssPrefix</code> and <code>cssClasses</code> options to reconfigure the markup.</p>

<h3>Things to watch out for</h3>

<ul style="margin: 20px">
Expand Down Expand Up @@ -187,6 +189,12 @@
</table>
</div>

<div class="viewer-header">Overriding classes</div>

<div class="viewer-content">
<pre><code><?php include 'more/classes.js'; ?></code></pre>
</div>

<div class="viewer-header">Containing handles within the slider bar (horizontal)</div>

<div class="viewer-content">
Expand Down
13 changes: 13 additions & 0 deletions documentation/more/classes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
noUiSlider.create(slider, {
start: 80,
range: {
min: 0,
max: 100
},
cssPrefix: 'noUi-', // defaults to 'noUi-',
cssClasses: {
// Full list of classnames to override. Does NOT extend the default classes.
// Have a look at the source for the full, current list:
// https://github.com/leongersen/noUiSlider/blob/master/src/js/options.js#L316
}
});

0 comments on commit 3971cd9

Please sign in to comment.