If I have this code:
click
in jquery, you can just write:
$("#myname").find(':selected').attr('isred');