p-slider and setvalue

jQuery UI Widgets
Post Reply
matas
Posts: 10
Joined: 11 Jun 2013, 14:03

05 Feb 2018, 20:33

Hi,
In the showcase of PrimeUi, for p-slider we can read that a method setValue(val) is available. How can i set the value of a p-slider on the client please ?
I tried this :
<p-slider id="slider"> </p-slider>
And in the js :
$("#slider").setValue(50);
but the slider is not update and i get the error : TypeError: $(...).setValue is not a function ...

Can anyone help me please ?

matas
Posts: 10
Joined: 11 Jun 2013, 14:03

15 Feb 2018, 20:18

Hi,
I eventualy used JQuery slider like that :
$("#hslider").slider({
name: hslider,
change: moveHorizontalChange
});

And change the value on the client with :
$("#hslider").slider("value", 50);

Works just fine like that :D

Post Reply

Return to “PrimeUI”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests