help needed removing "class" from dropdown menu
Hi all,
I am extremely new to jquery, something I will eventually need to look into and would like to learn but unfortunately just not enough hours in the day.....
Anyway, I have scratched around on the web and cobbled together a simple accordion dropdown whereby when you click on a "title-bar" a text area drops down beneath, the title-bar is assigned the class "selected" and changes colour and border style using CSS. When another title-bar is selected, every thing happens as it should first text area closes and title-bar changes back to original colour the newly selected title-bar is assigned the "selected" class and changes colour with the dropdown text area appearing underneath.
The problem I am up against is when a title-bar is clicked to open and then clicked a second time to close, the text area closes but the title bar is retaining the "selected" class state and not returning to its original colour and border style (orange with 4 rounded corners).
I have create a fiddle showing as far as I have got, now need a little help getting the title-bar to revert back to its original state when clicked twice.
http://jsfiddle.net/wayneali/HqFRt/4/
Many thanks in advance, Wayne