[Seaside] Re: Infinite Scrolling
self at je77.com
Tue Apr 28 14:08:07 UTC 2015
Cool. Thanks for sharing.
On Mon, Apr 27, 2015 at 7:35 PM Paul DeBruicker <pdebruic at gmail.com> wrote:
> I made an JQWidgetBox endless scroll widget a while ago, but never shared
> I guess. I just uploaded it to Smalltalkhub. see:
> Its a plugin for https://github.com/fredwu/jQuery-Endless-Scroll
> I'm not sure if/how the Widget is out of sync with the JS code in the git
> repo but its a start.
> I used it like this:
> renderEndlessScroll: html with: aRequest with: id
> (((html jQuery id: id) endlessScroll)
> fireDelay: 5000;
> fireOnce: true;
> bottomPixels: 850;
> insertAfter: '.results:visible:last';
> visible: '#' , id;
> (html jQuery ajax
> script: [
> :s |
> << (s jQuery class: 'loader') show.
> << (s jQuery class: 'results:visible:last')
> replaceWith: [ :h | | moreItems |
> moreItems := self getMoreResults: aRequest.
> self renderMoreItems: moreItems from: aRequest at: id on: h ].
> << (s jQuery class: 'shown:visible')
> replaceWith: [ :h |
> (h span)
> class: 'shown';
> with: [html strong: aRequest results oldResults size
> asStringWithCommas ] ] ]))
> jrick wrote
> > I'm implementing a blog with many posts. I'd like to implement infinite
> > scrolling
> > <http://www.sitepoint.com/jquery-infinite-scrolling-demos/> so
> > that only a few posts get loaded initially and then subsequent posts get
> > loaded once the person scrolls to the bottom of the page. I'd like to use
> > AJAX prepend to make this happen.
> > Has anyone implemented something similar? Is there a good way to trigger
> > seaside ajax call based on an element appearing on screen or a scroll
> > event
> > reaching near the bottom?
> > Cheers,
> > Jeff
> > _______________________________________________
> > seaside mailing list
> > seaside at .squeakfoundation
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> View this message in context:
> Sent from the Seaside General mailing list archive at Nabble.com.
> seaside mailing list
> seaside at lists.squeakfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside