5 <title>jQuery UI Spinner - Overflow</title>
6 <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
7 <script src="../../jquery-1.9.1.js"></script>
8 <script src="../../external/jquery.mousewheel.js"></script>
9 <script src="../../ui/jquery.ui.core.js"></script>
10 <script src="../../ui/jquery.ui.widget.js"></script>
11 <script src="../../ui/jquery.ui.button.js"></script>
12 <script src="../../ui/jquery.ui.spinner.js"></script>
13 <link rel="stylesheet" href="../demos.css">
16 $( "#spinner" ).spinner({
17 spin: function( event, ui ) {
18 if ( ui.value > 10 ) {
19 $( this ).spinner( "value", -10 );
21 } else if ( ui.value < -10 ) {
22 $( this ).spinner( "value", 10 );
33 <label for="spinner">Select a value:</label>
34 <input id="spinner" name="value" />
37 <div class="demo-description">
39 Overflowing spinner restricted to a range of -10 to 10.
40 For anything above 10, it'll overflow to -10, and the other way round.