ProIcons commented on a Page, Scroll Append - Inifinite/Endless Scroll  -  Mar 13, 2013

I can't make it work on my PopOver content,

                            var notifas=10;
                            $(notif_scroll=function() {

                                $('#notif_drop').scrollAppend({
                                    url: 'notifications.php',
                                    pixelBuffer:50,
                                    params: { action: "more", start: notifas},
                                    appendTo: "#notif_drop",
                                    footerClass: "#footer_drop",
                                    callback: function() {
                                        console.log("start:"+(notifas));
                                        notifas+=10;
                                        $('[rel=timeago]').timeago();
                                        notif_scroll();
                                        $(".popover-content").mCustomScrollbar("update");
                                        $(".popover-content").mCustomScrollbar("scrollTo","top");
                                    }
                                });
                            });
                <div id="notif_drop">
                <ul class="not"><li class="notif">
                        <a class="notif" href="/core/feed.php?id=104&to=/about">
                            <img src="/img/default_user_icon.jpg">
                            <span class="header">
                                <span class="name">_Minimal_</span> 
                                <span class="desc">eafcjsay</span>
                            </span>
                            <span class="time"><i class="icon-time"></i><abbr title="2013-03-13 15:29:13" rel="timeago">about 8 hours ago</abbr></span>
                        </a>
                    </li>
                </ul>
                .................................................................................................................................
                <ul class="not"><li class="notif">
                        <a class="notif" href="/core/feed.php?id=63&to=/about">
                            <img src="/img/default_user_icon.jpg">
                            <span class="header">
                                <span class="name">NetM</span> 
                                <span class="desc">rjwrwfum</span>
                            </span>
                            <span class="time"><i class="icon-time"></i><abbr title="2013-03-13 13:53:21" rel="timeago">about 9 hours ago</abbr></span>
                        </a>
                    </li>
                </ul></div>
                <<div id="footer_drop">End</div>

but when i scroll at the end of the page, it load the content inside the popover... :/

Edit: I also changed some lines into the source code

Line: 206
$(self.options.footerClass).addClass('footer_fixed')
->
//$(self.options.footerClass).addClass('footer_fixed')

Line: 212
self.position = 'fixed';
->
//self.position = 'fixed';

ProIcons  -  Mar 13, 2013

Well i Noticed in the code that is only for WINDOW, can you make it dynamic for each content or shall i make it?

Hawkee  -  Mar 13, 2013

Yes, this only works for the window and not multiple elements on the page. Feel free to edit it to work for multiple elements. If your change is backward compatible and elegant feel free to push it to the github repo.

Sign in to comment

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.