Probably better to explain what you intend to do with the width so we can collectively cloud source storm a solution.
I have a div which contains a series of left-floated img thumbnails (of varying width). That div is hidden from display under a display:none div until a certain link is clicked (imagine a Windows start menu button which expands when clicked).
I need to specify the width of the container div based on the width of all of the thumbnails because it is dependent on the browser's screen width.
To make things more difficult, this whole thing is embedded within another page which is .loaded into the current page.
So, the viewer's workflow is as follows:
1. Open page
2. Viewer sees 3 buttons (Photos, Videos, Other). Clicks on Photos
3. There is a div on that page which .loads the gallery content (this works fine)
- The gallery div contains a series of links which are gallery titles
4. Viewer clicks on a gallery title, and thumbnails of that gallery expand (this doesn't work as the width of the thumbnails div isn't being calculated)