I am trying to get a click event on table headers and this is easy using jQuery. I want the click event to be active in all headers except the first heading.
I run the first header with: nth-child () CSS property.
This is how I do it -
$(function(){ $('th:nth-child(2 3 4 5)').click(function(){ $(this).CSS("font-weight","bolder"); }); });
I do not get the result. Is there a better way to do this with :nth-child() ?
source share