I was trying out jQuery Slider and used an example to play around.
EDIT: I would like to have the slider show the values, like a ruler, to increase usability. As it is now, I am finding it difficult to pass the usability testing. People complain that they want to know what value they are picking before they start sliding.
Any ideas how I can achieve this ? As far as I searched, I could not find out about whether this feature already exists or about how to do this.
<html>
<head>
<link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script>
<script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.core.js"></script>
<script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.slider.js"></script>
<style type="text/css">
#slider { margin: 10px; }
</style>
<script type="text/javascript">
$(function() {
$("#slider").slider({
value: 50,
min: 0,
max: 99,
step: 1,
slide: function(event, ui) {
$("#amount").val('$' + ui.value);
}
});
$("#amount").val('$' + $("#slider").slider("value"));
});
</script>
</head>
<body style="font-size:62.5%;">
<div id="slider"></div>
<input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;" />
</body>
</html>