Value in input of range sliders

3 replies · opened Nov 7, 2016

JjuanchpNov 7, 2016

Hello to all,
I want to use range sliders instead radio buttons in a page, exactly in the "demo-app-landing". I add the specific styles, and the range sliders js, and I try to use this function (range_07 style):

$(document).ready(function () {

			$(".range_07").ionRangeSlider({
				grid: true,
				min: 0,
				max: 10,
				step:2,
				values: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
			});

		});

After I write the code of the input field to display the slider, I don't know how can I assign the value of the slider to the value of the input where is displayed. The HTML is:
``

Thank you so much!
Juan Carlos

JjuanchpNov 7, 2016

I forgot to say that I want to use around 60 sliders in the same page... I assume that this is not a problem...

Thanks in advance!

JjuanchpNov 8, 2016

I find a solution for this for other ion.rangeslider users:

http://jsfiddle.net/juankypanky/63y44dkw/

HTML


    
    

    
    

JAVASCRIPT


		$(document).ready(function () {

			var $ranges = $(".elslider");

			function update (data) {
				var $from = $(data.input).siblings(".elinput");
			    $from.prop("value", data.from);
			}

			$ranges.ionRangeSlider({
					grid: true,
					min: 0,
					max: 10,
					from:0,
					step:2,
					values: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
					onFinish: update
			});

		});

	

Regards,
Juan Carlos

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard