2011-02-07 17:45:10 +00:00
|
|
|
<!DOCTYPE html>
|
2010-10-22 04:16:12 +00:00
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<title>jQuery UI Spinner - Default functionality</title>
|
|
|
|
<link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
|
2011-01-11 02:38:58 +00:00
|
|
|
<script type="text/javascript" src="../../jquery-1.4.4.js"></script>
|
2010-10-26 08:53:03 +00:00
|
|
|
<script type="text/javascript" src="../../external/jquery.mousewheel-3.0.4.js"></script>
|
2010-10-22 04:16:12 +00:00
|
|
|
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
|
|
|
|
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
|
|
|
|
<script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
|
|
|
|
<script type="text/javascript" src="../../ui/jquery.ui.spinner.js"></script>
|
|
|
|
<link type="text/css" href="../demos.css" rel="stylesheet" />
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(function() {
|
|
|
|
$("#spinner").spinner();
|
|
|
|
|
|
|
|
$("#disable").toggle(function() {
|
|
|
|
$("#spinner").spinner("disable");
|
|
|
|
}, function() {
|
|
|
|
$("#spinner").spinner("enable");
|
|
|
|
});
|
|
|
|
$("#destroy").toggle(function() {
|
|
|
|
$("#spinner").spinner("destroy");
|
|
|
|
}, function() {
|
|
|
|
$("#spinner").spinner();
|
|
|
|
});
|
|
|
|
$("#getvalue").click(function() {
|
|
|
|
alert($("#spinner").spinner("value"));
|
|
|
|
});
|
|
|
|
$("#setvalue").click(function() {
|
|
|
|
$("#spinner").spinner("value", 5);
|
|
|
|
});
|
|
|
|
|
|
|
|
$("button").button();
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<div class="demo">
|
|
|
|
|
|
|
|
<p><label for="spinner">Select a value:</label>
|
|
|
|
<input id="spinner" name="value" /></p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
<button id="disable">Toggle disable/enable</button>
|
|
|
|
<button id="destroy">Toggle widget</button>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
<button id="getvalue">Get value</button>
|
|
|
|
<button id="setvalue">Set value to 5</button>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
</div><!-- End demo -->
|
|
|
|
|
|
|
|
<div class="demo-description">
|
|
|
|
<p>
|
|
|
|
Default spinner.
|
|
|
|
</p>
|
|
|
|
</div><!-- End demo-description -->
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|