I have a table with different values. First column contains labels. I need to get the width of the widest label. I assume I need some sort of a loop, but then what?
var widestTdLabel=0;
$('#myTable td').each(function(index) {
if($(this).find('label').width()>widestTdLabel)
widestTdLabel=$(this).find('label').width();
});
alert(' width of the widest label is:'+widestTdLabel);