I have several elements that are grouped by range. I am creating a plugin for interacting with elements. Now I would like to provide my users with support for the val() function so that they can get or set the "value" of my range. Setting the value will cause the selection box item to change, and getting the value will add selectbox values.
Basically, I would like my plugin to add support for the val() method. Any ideas on how to implement this?
The code
<span id="test"> <select id="one"> <option value="1">1</option> <option value="2">2</option> </select> <select id="two"> <option value="1">1</option> <option value="2">2</option> </select> </span>
Challange
Get the following code to work: $('#test').val('1:1'); and $('#test').val() .
source share