I have a table with a liquid width. Im trying to use jQuery to get the width of a table cell (one has a class of calAv), and make all the cells have the same height so they are all square.
The following code seems to work fine in Firefox, Chrome and Safari.
function calHeightSet () {
calWidth = $('.calMonth .calAv').width();
//alert (calWidth);
$('.calMonth tr').css('height',calWidth);
}
The only mobile device ive tested with so far is an iPhone 3G, where it appears no height value is added. If I uncomment the alert, then the alert’s value in pixels is the height of the table cells. However this height is the same as if I completely remove this code.
You could try the jQuery height() function:
Alternatively, may be you need to be more specific and include
td: