I\'m a jQuery noob trying to track down a performance issue that we\'re having with large tables. We have a homegrown table widget which, among other things, sets the colum
if you do .width (and also .css("width")) on table cell (or headers) of very large tables, it takes an awful lot of time FOR HIDDEN ELEMENTS !!!, and is very fast for visible elements. The reason is, if the element is hidden, the browser, being nice and efficient, has not made any effort to find out what the width would be, if the element were visible. But jQuery's .width, apparently, for hidden elements, returns what the width would be, if it were visible, instead of just returning zero (it's hidden alright). For large tables, that means that the browser has to render the whole table again. If the table is really large it can take over a second. And if you then do that for multiple hidden columns (just measuring their widths) your page becomes useless.
so do not measure width of hidden elements unless you REALLY need to know.
relevant link, repeating what I just said (and more): here