> <select>
> <option>test</option>
> <option value="12">test</option>
> </select>
Can select that 12 value from a jquery click function any idea?
> <select>
> <option>test</option>
> <option value="12">test</option>
> </select>
Can select that 12 value from a jquery click function any idea?
You can get attributes in jQuery using the attribute function:
In your situation you would use the following code:
$(“option”).attr(“value”);
However note that you have two options without any id. jQuery will say the value is undefined because it will be looking at the first where there is no value.