[jQuery] call a function every time a different option is selected in a select element

[jQuery] call a function every time a different option is selected in a select element


Hi,
I'd like to call a certain function whenever I select a different
option from a select element.
I tried the following (as well as several other variants) but it
didn't work:
$("select#category option[selected!='']").change( function () {
    myfunction();
});
Please note that I'm trying to select the option for which the
"selected" attribute is not an empty string ''.
The selector returns the right option but then I don't know how to
associate that selection (or its change) to the right event.
Any help would be very appreciated
Francesco