<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 &lt;<a href="mailto:pdebruic@gmail.com">pdebruic@gmail.com</a>&gt; 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&#39;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: &#39;.results:visible:last&#39;;<br>
                                visible: &#39;#&#39; , id;<br>
                                callback:<br>
                                                (html jQuery ajax<br>
                                                                script: [ :s |<br>
                                                                        s &lt;&lt; (s jQuery class: &#39;loader&#39;) show.<br>
                                                                        s &lt;&lt; (s jQuery class: &#39;results:visible:last&#39;)<br>
                                                                                replaceWith: [ :h |     | moreItems |<br>
                                                                                        moreItems := self getMoreResults: aRequest.<br>
                                                                                        self renderMoreItems: moreItems from: aRequest at: id on: h ].<br>
                                                                        s &lt;&lt; (s jQuery class: &#39;shown:visible&#39;)<br>
                                                                                replaceWith: [ :h |<br>
                                                                                        (h span)<br>
                                                                                                class: &#39;shown&#39;;<br>
                                                                                                with: [html strong: aRequest results oldResults size<br>
asStringWithCommas ] ] ]))<br>
<br>
<br>
<br>
<br>
jrick wrote<br>
&gt; I&#39;m implementing a blog with many posts. I&#39;d like to implement infinite<br>
&gt; scrolling<br>
&gt; &amp;lt;<a href="http://www.sitepoint.com/jquery-infinite-scrolling-demos/&amp;gt" target="_blank">http://www.sitepoint.com/jquery-infinite-scrolling-demos/&amp;gt</a>; so<br>
&gt; that only a few posts get loaded initially and then subsequent posts get<br>
&gt; loaded once the person scrolls to the bottom of the page. I&#39;d like to use<br>
&gt; AJAX prepend to make this happen.<br>
&gt;<br>
&gt; Has anyone implemented something similar? Is there a good way to trigger a<br>
&gt; seaside ajax call based on an element appearing on screen or a scroll<br>
&gt; event<br>
&gt; reaching near the bottom?<br>
&gt;<br>
&gt; Cheers,<br>
&gt;<br>
&gt; Jeff<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; seaside mailing list<br>
<br>
&gt; seaside@.squeakfoundation<br>
<br>
&gt; <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>