http://jsfiddle.net/RSGrW/1/
First update after reading comments:
var id = $("#milesAway:visible option:selected, #zipCode:visible, #cityState:visible").attr('id');
Since I saw that you entered the identifiers inside the option, I decided that you want this to return. This is an alternative only to enter or select an identifier.
var id = $("#milesAway:visible, #zipCode:visible, #cityState:visible").attr('id');
source share