"Check all" checkbox doesn't behave as expected if clicked before any other element
Hi
I created the following JSFIDDLE: http://jsfiddle.net/s5Gzd
The idea here is a table with different effects:
* Even rows will be assigned a different style than the odd ones.
* Hovering effect when placing the mouse over a row
* Changing the color of a row when clicking on it or on the checkbox located on the first column.
* "Check all" checkbox, which will select/deselect all rows and adjust its colors according to the state of this checkbox.
Here I have only one problem: if the first thing you clicked on is the "check all" checkbox, all the checkboxes in the other rows will be checked, but the color of the rows won't change. But if instead of clicking on the "check all" checkbox the first thing you do is to click on a row or another checkbox and then again on the "check all" checkbox, this time all the checkboxes will be selected and the colors of the rows will be changed.
How can I solved that problem?
Best regards
Josef