jquery-ui/demos/spinner/default.html

66 lines
1.8 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<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-03-03 01:44:26 +00:00
<script type="text/javascript" src="../../jquery-1.5.1.js"></script>
<script type="text/javascript" src="../../external/jquery.mousewheel-3.0.4.js"></script>
<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>