Looping through a SharePoint List column and acting on each item in the column using jQuery

I wanted to loop through a couple columns in the Default View of a SharePoint List. The jQuery code below would loop through the 4th, 5th, and 10th columns and alert the contents of that column. Obviously you can do anything you like with the matches. More tomorrow on how I was using this method

$('table.ms-listviewtable td:nth-child(4),table.ms-listviewtable td:nth-child(5),table.ms-listviewtable td:nth-child(10)').each(function () {

alert($(this).Text())
}

,

Comments are closed.

Powered by WordPress. Designed by WooThemes