What\'s the event to bind for when a select form is selected?
I have something like this:
Maybe select() is a more accurated solution:
$('#list').select(function() {
if ($(this).val() === '2') {
// Do something for option "b"
}
});
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