So, I will explain a bit further.
I have a table with different cells. What I need to do is that when the user clicks on the cell, that cell would change its class and highlight. That is working perfect.
The thing is I need is to unhighlight that cell if another cell is clicked.
All cells has the "unselected" class by default. When clicked, class is changed to "unselected selected". Imagine a radioButton, thats the way I need it to work.
$('.unselected').click(function() {
$("td").find("unselected selected").removeClass("selected");
$(this).toggleClass("selected", this.clicked);
});
Any clues?
Thanks in advance.