Click to highlight doesn't work for existing conditional colouring
Click to highlight doesn't work for existing conditional colouring

I've asked this question in below chain, but guess it is better open a new topic for new comer to search. ( I will copy the answer over if anyone replies on the other one)
Question as following -
I added the 'click to highlight' function on top of the conditional colouring. but it doesn't overlap the existing colouring.
$('#example tbody').on( 'click', 'tr', function () {
$(this).toggleClass('selected');
});
e.g. if you click on the yellow row in below link, nothing happens.
http://live.datatables.net/kuzajico/1
Is there a way to make 'click to highlight' happen on the yellow row?
Thanks,
This question has an accepted answers - jump to answer
Answers
That's because of the
!important
, that's taking priority - you need to add a specific rule for the highlighted class too, see here: http://live.datatables.net/kuzajico/3/editColin
thank you, that works perfectly.