开发者

Jquery slider with radio buttons

开发者 https://www.devze.com 2023-03-12 05:15 出处:网络
I\'ve been reading this [1]: Using JQuery UI to convert radio buttons into slider elements and now have a slider that slides using radio buttons. I\'m having trouble trying to set the default value o

I've been reading this [1]: Using JQuery UI to convert radio buttons into slider elements

and now have a slider that slides using radio buttons. I'm having trouble trying to set the default value of the slider. I have a hidden field on the page that contains the default value as a number and I want the radio button with that id to be checked and have t开发者_如何学Che slider represent this. All i can think of doing is using javascript to check that radio button. Is this correct?


Use ELEMENT.prop("checked", true) under jQuery 1.6 or ELEMENT.attr('checked','checked') for anything under jQuery 1.6 to check the radio button, and for the slider you can use SLIDER_ELEMENT.value(MY_VALUE) to set the value of it.

0

精彩评论

暂无评论...
验证码 换一张
取 消