jQuery event when select option
This jQuery snippet will get you started:
$('#list').change(function() {
if ($(this).val() === '2') {
// Do something for option "b"
}
});
the event you are looking for is change
. more info about that event is available in the jquery docs here: http://docs.jquery.com/Events/change#fn