Using jQuery, how would you figure out how many columns are in a table?
-
2020-12-28 13:27
function(){
num_columns = 0;
$("table td]").each(function(){
num_columns = num_columns + ($(this).attr('colspan') == undefined ? 1 : $(this).attr('colspan'));
});
return num_columns;
}