jquery select box help needed -
i have select box , option value has
united kingdom united states
when select "united kingdom" option want 2 values "uk" selected value , param value 1
any possiblity using jquery?
you use .data() function. first have set data on select options.
<option data-country="uk" data-value="1" selected="selected"></option>
then can data doing following:
$("option:selected").data("country"); $("option:selected").data("value");
Comments
Post a Comment