Sunday, May 26, 2013

Access Select option using a value

This is an example that accesses the select option inside the span editsc_span with the value cid, and makes its attribute to selected.

$('span#editsc_span select option[value="'+cid+'"]').attr("selected", "selected");

No comments:

Post a Comment