jQuery to hide a column

I wanted to hide a column and I found this simple way to do that in jQuery. Can’t find where I originally came across it. Sorry if you figured it out first.

$('th:nth-child(5),td:nth-child(5),th:nth-child(6),td:nth-child(6)').hide()

This hides the 5th and 6th columns. I am going to use this in a SharePoint list where I want to hide the column and put the contents in a jQuery dialog box. More on that in a bit (I hope).

Update: found my source for this

Comments are closed.