コード例 #1
0
ファイル: more.php プロジェクト: dan-win/noUiSlider
		</div>

		<div class="viewer-header">Updating the slider with new options on <code>button</code> click</div>

		<div class="viewer-content">
			<?php 
code('update');
?>
		</div>
	</div>

</section>


<?php 
sect('styling');
?>
<h2>Styling</h2>

<section>

	<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>

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

		<ul style="margin: 20px">
			<li>If you want the handles to stay within the slider bar (instead of the default overlap), have a look at the CSS detailed to the right. Add the styles to your stylesheet and give your element the <code>noUi-extended</code> class for this effect.</li>
			<li>The <code>.noUi-connect</code> and <code>.noUi-background</code> classes are applied to various elements.</a>
			<li>To position your handles on the center of its relative position, it should have a <strong>negative offset</strong> of half the handle width. See the default theme for reference.</li>
		</ul>
コード例 #2
0
ファイル: slider-options.php プロジェクト: dan-win/noUiSlider
			<div><code>false</code>, <code>true</code>, <code><em>formatter</em></code>, <code>array[<em>formatter</em> or false]</code></div>
		</div>
	</div>

	<div class="side">

		<?php 
code('tooltips');
?>
	</div>

</section>


<?php 
sect('animate');
?>
<h2>Animate</h2>

<section>

	<div class="view">

		<p>Set the animate option to <code>false</code> to prevent the slider from animating to a new value with when calling <code>.val()</code>.</p>

		<div class="example" style="margin: 0; padding-bottom: 20px">
			<div class="sliders" id="slider-animate-true"></div>
			<button id="set-sliders">Set sliders</button>
		</div>

		<div class="example" style="margin: 0;">
コード例 #3
0
ファイル: index.php プロジェクト: maxamad13/tutor-sign
		<p>Putting all your scripts in the page <code>&lt;head&gt;</code> will slow down your site. If you'd like to know why, consider reading <a href="http://developer.yahoo.com/performance/rules.html#js_bottom">this article by Yahoo!</a>. Put the slider CSS in your <code>&lt;head&gt;</code>, and the script at the end of the <code>&lt;body&gt;</code>.</p>

		<p>To create a slider, call <code>noUiSlider.create()</code> with an element and your options.</p>
	</div>

	<div class="side">

<pre class="language-markup"><code>&lt;!-- In &lt;head&gt; --&gt;
&lt;link href="nouislider.min.css" rel="stylesheet"&gt;

&lt;!-- In &lt;body&gt; --&gt;
&lt;script src="nouislider.min.js"&gt;&lt;/script&gt;</code></pre>

	</div>
</section>


<?php 
sect('browser-support');
?>
<h2>Browser support</h2>

<section>

	<div class="view">

		<p>noUiSlider supports <strong>IE9 and up</strong>, and the latest versions of the <em>'evergreen'</em> browsers: <strong>Chrome</strong>, <strong>Safari</strong>, <strong>Firefox</strong> and <strong>Opera</strong>.</p>
	</div>
</section>
コード例 #4
0
ファイル: examples.php プロジェクト: maxamad13/tutor-sign
?>
		</div>

		<div class="viewer-header">Example tooltip styling</div>

		<div class="viewer-content">
			<?php 
loadShowCSS('tooltip');
?>
		</div>
	</div>
</section>


<?php 
sect('soft-limits');
?>
<h1>Soft limits</h1>

<section>

	<div class="view">

		<p>If you want to disable the edges of a slider, the set event can be used to reset the value if a limit is passed. Note how the handle 'bounces back' when it is released below <code>20</code> or above <code>80</code>. noUiSlider doesn't support disabling edges altogether, but this effect might be created visually by <a href="/nouislider/more#section-styling">setting padding</a> on the slider.</p>

		<div class="example">
			<div id="soft"></div>
			<?php 
run('slider-soft-setup');
?>
			<?php 
コード例 #5
0
		<p>This event is useful when you want to update a value or perform an actions every time a handle is dragged. For example, you can use the <code>'slide'</code> event to update graphs. For convenience, this function also fires on a change by 'tap'.</p>
	</div>
</section>


<?php 
sect('set');
?>
<h2>Set</h2>

<section>

	<div class="view">
		<p>Whenever a slider is changed to a new value, this event is fired. This function will trigger every time a slider <em>stops</em> changing, <strong>including</strong> after calls to the <code>.val()</code> method. You can consider this 'end of slide'.</p>
	</div>

</section>


<?php 
sect('change');
?>
<h2>Change</h2>

<section>

	<div class="view">
		<p>This event is similar to the <code>change</code> events on regular <code>&lt;input&gt;</code> elements. It fires when a user <em>stops</em> sliding, or when a slider value is changed by 'tap'.</p>
	</div>
</section>
コード例 #6
0
ファイル: pips.php プロジェクト: markoshust/noUiSlider
		</div>
	</div>

	<div class="side">
		<?php 
code('count');
?>
		<?php 
code('count-stepped');
?>
	</div>
</section>


<?php 
sect('values');
?>
<h2>Values</h2>

<section>

	<div class="view">

		<p>The <code>values</code> mode is similar to <code>positions</code>, but it accepts values instead of percentages. The <code>stepped</code> option can be used for this mode.</p>

		<div class="example">
			<div id="pips-values"></div>
			<?php 
run('values');
?>
		</div>
コード例 #7
0
			<?php 
run('snap');
?>
		</div>
	</div>

	<div class="side">
		<?php 
code('snap');
?>
	</div>
</section>


<?php 
sect('combined');
?>
<h2>Combined options</h2>

<section>

	<div class="view">
		<p>Most <code>'behaviour'</code> flags can be combined.</p>
		<div class="example">
			<div id="combined"></div>
			<?php 
run('combined');
?>
		</div>
	</div>
コード例 #8
0
code('non-linear-step');
?>

		<div class="viewer-header">Display the slider value</div>

		<div class="viewer-content">
			<?php 
code('non-linear-step-link');
?>
		</div>
	</div>
</section>


<?php 
sect('snap');
?>
<h3>Snapping between steps</h3>

<section>

	<div class="view">
		<p>When a non-linear slider has been configured, the <code>snap</code> option can be set to <code>true</code> to force the slider to jump between the specified values.</p>

		<div class="example">
			<div id="slider-snap"></div>
			<span class="example-val" id="slider-snap-value-lower"></span>
			<span class="example-val" id="slider-snap-value-upper"></span>
			<?php 
run('snap');
?>
コード例 #9
0
?>

		<div class="viewer-header">Handling button presses</div>

		<div class="viewer-content">
			<?php 
code('buttons');
?>
		</div>
	</div>

</section>


<?php 
sect('formatting');
?>
<h2>Number formatting</h2>

<section>

	<div class="view">

		<p>To format the slider output, noUiSlider offers a <code>format</code> option. Simply specify <code>to</code> and <code>from</code> functions to encode and decode the values. See <em>manual formatting</em> to the right for usage information.</p>

		<p>By default, noUiSlider will format output with <strong>2 decimals</strong>.</p>

		<p>Manual formatting can be very tedious, so noUiSlider has support for <a href="/wnumb">the wNumb formatting library</a>. wNumb offers a wide range of options and provides number validation.</p>

		<div class="example">
			<div id="slider-format"></div>