Skip to content

Commit

Permalink
Documentation on update
Browse files Browse the repository at this point in the history
  • Loading branch information
leongersen committed Jan 12, 2018
1 parent b0dfd07 commit 3000248
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions documentation/more.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,16 @@

<div class="view">

<p>noUiSlider has an update method that can change the <code>'margin'</code>, <code>'limit'</code>, <code>'step'</code>, <code>'range'</code>, <code>'animate'</code> and <code>'snap'</code> options. All other options require changes to the slider's HTML or event bindings.</p>
<p>noUiSlider has an update method that can change the <code>'margin'</code>, <code>'limit'</code>, <code>'step'</code>, <code>'range'</code>, <code>'animate'</code> and <code>'snap'</code> options.</p>

<p>To update any other option, destroy the slider using <code>slider.noUiSlider.destroy()</code> and create a new one. Note that events are <strong>not</strong> unbound when destroying a slider.</p>
<p>All other options require changes to the slider's HTML or event bindings.</p>

<p>To update any other option, destroy the slider using <code>slider.noUiSlider.destroy()</code> and create a new one. Events are unbound when destroying a slider.</p>

<p>The update method can be called as <code>slider.noUiSlider.updateOptions(newOptions, [fireSetEvent])</code>.</p>

<p>Options that can not be updated will be ignored without errors.</p>

<p>The <code>'update'</code> event fires after updating the slider.</p>

<p>By default, the sliders <strong>values remain unchanged</strong>. To update the slider values, <code>newOptions</code> may also contain a <code>start</code> property</a> that matches the signature of the <a href="/nouislider/slider-read-write/#section-setting"><code>set</code></a> method.</p>
Expand Down

0 comments on commit 3000248

Please sign in to comment.