I'm experiencing a weird scrollbar issue. I'm building a page that uses jQuery and PHP to dynamically load images into a DIV sequentially. This DIV is a fixed height but uses a scrollbar for its variable width. The problem is that the scrollbar does not reset after a dynamic refresh of the DIV. So when the user scrolls and then refreshes with new content, the scroll bar position stays persistent instead of resetting back to the left.
This seems to only happen in FF3. The scrollbar resets perfectly fine in Chrome, Safari, and IE8.
For each refresh, the DIV is hidden, emptied, sized with CSS, then sequentially appended with images.
I've tried resetting
OK, after contemplating David M's suggestions, I figured it out. Since
#interiors is a child of
#content it was also being hidden. So I had to
show it first, set
hide it again. A bit kludgy, but whatever works...
$('#landing, #interiors, #caption').empty(); $('#content').show() $('#interiors').scrollLeft(0); $('#interiors, #caption').hide();
Regarding the cached data in FF3, I'm still not clear on that. Save that one for a rainy day...