Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ionrangeslider update value with previously set value

I am using ionRangeslider in one of my forms to show the range of tips.

How can I update the value on submit button click so that when next time page loads, it shows the slider with that particular updated value?

HTML code

<input type="text" class="exampleslider" id="exampleslider" name="tips">

And Calling to ionRangeSlider via js

$('.exampleslider').ionRangeSlider({
  from: 0,
  to: 100,
  min: 0,
  grid: true,
  grid_num: 10,
  step: 10,
  postfix: '%',
});

Input is given name tips through which I want to set its value via database.

like image 946
Shashank Bhatt Avatar asked Aug 23 '17 09:08

Shashank Bhatt


1 Answers

 var instance = $(id).data("ionRangeSlider");

 instance.update({
   from: 10 //your new value
 });
like image 190
sajad khajeh Avatar answered Nov 18 '22 07:11

sajad khajeh