When I set an attribute or a Data in the <option > tag and try get it
back, it dosent work in IE8 but works in IE6, IE7 and Firefox 3.

Something like this:

<select id="ID1">
<option value="sample 1" selected>Sample 1</option>
</select>

<javascript>
//set
$("#ID1 > option[selected]").attr("dados", "new attr");
//or
$("#ID1 > option[selected]").data("dados", "new attr");

//get (dosent work in IE8 :(  )
var test1 = $("#ID1 > option[selected]").attr("dados");
//or
var test1 = $("#ID1 > option[selected]").data("dados");


</javascript>

Reply via email to