2011-08-07 16:59:50 +00:00
|
|
|
<!doctype html>
|
2011-08-07 15:34:28 +00:00
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
2015-09-30 13:11:22 +00:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
2011-08-07 16:59:50 +00:00
|
|
|
<title>jQuery UI Spinner - Overflow</title>
|
2013-12-02 18:36:12 +00:00
|
|
|
<link rel="stylesheet" href="../../themes/base/all.css">
|
2011-08-07 16:59:50 +00:00
|
|
|
<link rel="stylesheet" href="../demos.css">
|
2015-07-01 03:34:08 +00:00
|
|
|
<script src="../../external/requirejs/require.js"></script>
|
|
|
|
<script src="../bootstrap.js" data-modules="external/jquery-mousewheel/jquery.mousewheel">
|
2011-08-07 16:59:50 +00:00
|
|
|
$( "#spinner" ).spinner({
|
|
|
|
spin: function( event, ui ) {
|
|
|
|
if ( ui.value > 10 ) {
|
|
|
|
$( this ).spinner( "value", -10 );
|
2011-08-07 15:34:28 +00:00
|
|
|
return false;
|
2011-08-07 16:59:50 +00:00
|
|
|
} else if ( ui.value < -10 ) {
|
|
|
|
$( this ).spinner( "value", 10 );
|
2011-08-07 15:34:28 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
2011-08-07 16:59:50 +00:00
|
|
|
<p>
|
|
|
|
<label for="spinner">Select a value:</label>
|
|
|
|
<input id="spinner" name="value" />
|
|
|
|
</p>
|
|
|
|
|
2011-08-07 15:34:28 +00:00
|
|
|
<div class="demo-description">
|
2011-08-07 16:59:50 +00:00
|
|
|
<p>
|
|
|
|
Overflowing spinner restricted to a range of -10 to 10.
|
|
|
|
For anything above 10, it'll overflow to -10, and the other way round.
|
|
|
|
</p>
|
2012-09-10 15:33:46 +00:00
|
|
|
</div>
|
2011-08-07 15:34:28 +00:00
|
|
|
</body>
|
|
|
|
</html>
|