View Single Post
Old 09-22-2012, 12:49 AM   PM User | #1
paffley
New Coder

 
Join Date: Sep 2010
Posts: 86
Thanks: 24
Thanked 0 Times in 0 Posts
paffley is an unknown quantity at this point
jQuery UI Slider and output problem

Hi Guys,
I've come kinda stuck here, I'm needing the following slider to output to 2 seperate editboxes each with there own values.

Code:
$(function() {
		$( "#jQuerySlider" ).slider({
			value:1,
			min: 0,
			max: 5,
			step: 1,
			slide: function( event, ui ) {
				$( "#pages" ).val( "Pages" + ui.value );
			}
		});
		$( "#pages" ).val( "Pages" + $( "#jQuerySlider" ).slider( "value" ) );

		$( "#jQuerySlider" ).slider({
			value:149,
			min: 149,
			max: 349,
			step: 50,
			slide: function( event, ui ) {
				$( "#amount" ).val( "£" + ui.value );
			}
		});
		$( "#amount" ).val( "£" + $( "#jQuerySlider" ).slider( "value" ) );
	});
I would like, When the slider is moved, it will change the value of the editbox #amount & #pages together

All I can get this to do at the moment is change the #amount

I need both the values to change once the slider is moved.

Kind regards,
paffley is offline   Reply With Quote