views:

80

answers:

0

Exact Duplicate:

Remove a class select option is not selected

Hello, When i select something from a selectbox it adds a class to the

selected option this way: $('div#tabs input[type="text"], select option:selected, input:checked, textarea').addClass('takethis'); But when i select a different option it doesn't remove the class 'takethis' from the option which I first selected. How can I force this?