0

Hi, i want to use the jQuery UI Slider plugin in my website, however rather than using numbers i want to use 4 different options (easy, medium, hard, very hard), for the user to choose on the slider, how would i do this.

This is the slider i want to use

jQuery UI Slider Snap to Increments

<style>
	#demo-frame > div.demo { padding: 10px !important; };
	</style>
	<script>
	$(function() {
		$( "#slider" ).slider({
			value:100,
			min: 0,
			max: 500,
			step: 50,
			slide: function( event, ui ) {
				$( "#amount" ).val( "$" + ui.value );
			}
		});
		$( "#amount" ).val( "$" + $( "#slider" ).slider( "value" ) );
	});
	</script>



<div class="demo">

<p>
	<label for="amount">Donation amount ($50 increments):</label>
	<input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;" />
</p>

<div id="slider"></div>

</div><!-- End demo -->



<div class="demo-description">
<p>Increment slider values with the <code>step</code> option set to an integer, commonly a dividend of the slider's maximum value.  The default increment is 1.</p>
</div><!-- End demo-description -->

I got it from here - http://jqueryui.com/demos/slider/#steps

Thanks and hopefully this makes sense.

Edited by kaosjon: n/a

1
Contributor
1
Reply
2
Views
5 Years
Discussion Span
Last Post by kaosjon
0

Anyone have any ideas?
I really need to get this working asap.

Thanks

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.