Opened 9 years ago

Closed 9 years ago

#9652 closed feature (notabug)

Add ability to define slider handle element type

Reported by: wrgill999 Owned by:
Priority: minor Milestone: none
Component: ui.slider Version: 1.10.3
Keywords: Cc:
Blocked by: Blocking:

Description

I recently wanted multiple form input elements to be contained within the <a> of the slider handle for ease of dragging with the handle. Nesting elements like this in an anchor element is not valid and FF and IE won't allow form input in this case. The slider handles should be able to be divs or spans etc.

Change History (1)

comment:1 Changed 9 years ago by tj.vantoll

Resolution: notabug
Status: newclosed

This seems like a very odd thing to be doing... but you can easily accomplish it with the widget - http://jsfiddle.net/tj_vantoll/Rs7c9/.

http://api.jqueryui.com/slider/

The slider widget will create handle elements with the class ui-slider-handle on initialization. You can specify custom handle elements by creating and appending the elements and adding the ui-slider-handle class before initialization. It will only create the number of handles needed to match the length of value/values. For example, if you specify values: [ 1, 5, 18 ] and create one custom handle, the plugin will create the other two.

Note: See TracTickets for help on using tickets.