We help IT Professionals succeed at work.

Dynamically change the width of a slider handle

dshrenik
dshrenik used Ask the Experts™
on
Please let me know how I can dynamically change the width of a slider handle through javascript code. I do not want to do it though JQuery's resizable().

http://jqueryui.com/demos/slider/#default

Thanks!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
leakim971Multitechnician
Top Expert 2014

Commented:
You may use : $(".ui-slider-handle").width("200px");

Author

Commented:
But, how do I do this if I have more than 1 slider? I have two single-handle sliders on my page.

Thanks!
Multitechnician
Top Expert 2014
Commented:
the previous will update all slider width.
else use :

$(".ui-slider-handle", "#slider1").width("100px");
$(".ui-slider-handle", "#slider2").width("200px");

Open in new window


or :

$(".ui-slider-handle:eq(0)").width("100px");
$(".ui-slider-handle:eq(1)").width("200px");

Open in new window