I have a table, and I\'m trying to find the width of each td in the table. I\'ve tried all kinds of variations of: $(\"td\")[0].width(), but none of them work,
$("td")[0]
Is a DOM Level element and not a jQuery Object. and .width() is a jQuery method, so you literally can't use it on that. Do either of the following:
$("td").eq(0).width(); // On a jQuery object
$("td")[0].offsetWidth; // On a DOM Level Element.
To fetch the width of all the elements use .each
$('td').each(function(){
alert($(this).width());
});