This is a hard question to answer since it's a bit unclear as to what you want to achieve.
If it's just checking if a list item is selected or not this is how I'd do it:
The HTML (yes I took it off of w3schools, sorry! why this is bad):
<select id="selectedLIST">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</select>
The jQuery
var list = $('#selectedLIST');
$(list).change(function(){
$.each(list.children(), function(index, value){
if($(value).attr('selected') === true){
alert("there is one selected");
}
});
});
This will produce a list that when a user selects a new element in the list will produce a popup saying "this is one selected" based on the attribute "selected" on the HTML tag.
Also, putting semi-colons after if-statements "terminates" that statement.
Also forgetting to put semi-colons will force the JS engine to do semi-colon insertions.