Basically I have a scrollable area, a container div, with loads of items of fixed height (say 50px).
When adding new content, the height of the div is gradually increased (i.e. the new content animates in such that its height increases from zero. All these are CSS transitions.
Now is there a way to ‘anchor’ the scrollable div to the bottom so that the content area in the scrollable div expands upwards and not downwards.
I would prefer a solution that does not not use setInterval().
Reply to the comment below.
The source is at Download-To-Dropbox/src (They are in Coffee and Stylus).
Try going to http://dtd.heroku.com (That’s the live copy). You’ll see that directories expand on the right pushing the parent directory to the left (basically it’s like the column view in Finder – Mac).
The problem here is that once you drill into multiple dub-directories and the horizontal scrollbar appears, The new directory that opens is hidden to the right of the screen. I’d like it to be visible throughout the transition time.
Suppose your
div‘s ID isscrolldiv. Here’s the basic function that adds content to thediv:Here’s a prototype of the function
animateAdd:Demo: little link.
Hope that helped you in any manner!