[thelist] refreshing content like twitter

Bob Meetin bobm at dottedi.biz
Thu Sep 6 21:06:01 CDT 2012


Thx,  I googled infinite scrolling and found a couple samples. I've seen them before (maybe it is twitter now), but that's not what I am trying to do, didn't describe the need well.

Rather than an infinite list I would want to show the 5 or so most recent events.  If the site becomes really active (need to be optimistic) and a new event arrives while you're viewing that page, it would smoothly scroll down from the top push the bottom event out of site.

To keep track of the current 5 I could probably add a flag in a database field, store the ID, perhap even prep and cache the content which was also suggested. Maybe I do a check for new content once a minute and only act if an event has occurred rather than sit there monitoring for an event like a daemon that wakes up. I sort of have this part working already having found a simple ajaxy javascript periodic update script.

What I'm really really weak with is the jQuery or JavaScript to make it smoothly scroll. I'd prefer to avoid Mootools.

On 09/06/2012 02:13 PM, AG wrote:
> This is usually referred to as "infinite scrolling". A search would bring you multiple resources, jQuery or other. You will probably find multiple jQuery ready made scripts that with minimum editing would work for you.
>
> AG
>


More information about the thelist mailing list