<div dir="ltr">Cool. Thanks for sharing.<br></div><br><div class="gmail_quote">On Mon, Apr 27, 2015 at 7:35 PM Paul DeBruicker <<a href="mailto:pdebruic@gmail.com">pdebruic@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I made an JQWidgetBox endless scroll widget a while ago, but never shared it<br>
I guess. I just uploaded it to Smalltalkhub. see:<br>
<a href="http://smalltalkhub.com/#!/~Seaside/JQueryWidgetBox" target="_blank">http://smalltalkhub.com/#!/~Seaside/JQueryWidgetBox</a><br>
<br>
Its a plugin for <a href="https://github.com/fredwu/jQuery-Endless-Scroll" target="_blank">https://github.com/fredwu/jQuery-Endless-Scroll</a><br>
<br>
I'm not sure if/how the Widget is out of sync with the JS code in the git<br>
repo but its a start.<br>
<br>
<br>
I used it like this:<br>
<br>
<br>
renderEndlessScroll: html with: aRequest with: id<br>
<br>
html<br>
script:<br>
(((html jQuery id: id) endlessScroll)<br>
fireDelay: 5000;<br>
fireOnce: true;<br>
bottomPixels: 850;<br>
insertAfter: '.results:visible:last';<br>
visible: '#' , id;<br>
callback:<br>
(html jQuery ajax<br>
script: [ :s |<br>
s << (s jQuery class: 'loader') show.<br>
s << (s jQuery class: 'results:visible:last')<br>
replaceWith: [ :h | | moreItems |<br>
moreItems := self getMoreResults: aRequest.<br>
self renderMoreItems: moreItems from: aRequest at: id on: h ].<br>
s << (s jQuery class: 'shown:visible')<br>
replaceWith: [ :h |<br>
(h span)<br>
class: 'shown';<br>
with: [html strong: aRequest results oldResults size<br>
asStringWithCommas ] ] ]))<br>
<br>
<br>
<br>
<br>
jrick wrote<br>
> I'm implementing a blog with many posts. I'd like to implement infinite<br>
> scrolling<br>
> &lt;<a href="http://www.sitepoint.com/jquery-infinite-scrolling-demos/&gt" target="_blank">http://www.sitepoint.com/jquery-infinite-scrolling-demos/&gt</a>; so<br>
> that only a few posts get loaded initially and then subsequent posts get<br>
> loaded once the person scrolls to the bottom of the page. I'd like to use<br>
> AJAX prepend to make this happen.<br>
><br>
> Has anyone implemented something similar? Is there a good way to trigger a<br>
> seaside ajax call based on an element appearing on screen or a scroll<br>
> event<br>
> reaching near the bottom?<br>
><br>
> Cheers,<br>
><br>
> Jeff<br>
><br>
> _______________________________________________<br>
> seaside mailing list<br>
<br>
> seaside@.squeakfoundation<br>
<br>
> <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://forum.world.st/Infinite-Scrolling-tp4821669p4822313.html" target="_blank">http://forum.world.st/Infinite-Scrolling-tp4821669p4822313.html</a><br>
Sent from the Seaside General mailing list archive at Nabble.com.<br>
_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
</blockquote></div>