I'm writing a javascript based photo gallery with a horizontally scrollable thumbnail bar.
>> My current work in progress is here <<
I would like the thumbnail bar to stop scrolling when it gets to the last thumbnail. To do this I need to find the total width of the contents of the div - preferably without adding up the widths of all the thumbnail images and margins.
I've put an alert in my window.onload function so I can test the various element dimension functions in different browsers. currently it's showing the value of scrollWidth, witch is reported as 1540px by IE and 920px by FireFox, Safari, Opera, etc.
The value 1540 is the correct one for my purposes, Can anyone tell me how to obtain this value in FireFox, etc.