Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scroll continues to load page automatically #11

Open
youresoshain opened this issue Feb 14, 2014 · 2 comments
Open

scroll continues to load page automatically #11

youresoshain opened this issue Feb 14, 2014 · 2 comments

Comments

@youresoshain
Copy link

I am having an issue where your scroll is continuing to load the page without interaction from the screen.

<script type="text/javascript"> $(function(){ var feeds = $("#feeds ul"); var last_time = feeds.children().last().data('id'); feeds.scrollFeedPagination({ 'contentPage': '/ajax_results.cfm?ajax_type=get_site_feed', 'contentData': { 'last_time' : last_time, 'f_member_id_recipient': '5', 'use_feed_type' : '1,2,3,4,5,6,7,9,12,13,14,15,16,17,18,19,20,21,22', 'use_class_id' : '1,2,3,4' }, 'heightOffset': 300, 'scrollTarget': $(window), 'beforeLoad': function(){ $('.loading').fadeIn(); }, 'afterLoad': function(elementsLoaded){ last_time = feeds.children().last().data('id'); feeds.scrollFeedPagination.defaults.contentData.last_time = last_time; $('.loading').fadeOut(); var i = 1; $(elementsLoaded).fadeIn(); } }); $.fn.fadeInWithDelay = function(){ var delay = 0; return this.each(function(){ $(this).delay(delay).animate({ opacity:1 }, 200); delay += 100; }); }; //calling the function to update news feed setTimeout('updateFeed()', 1000); }); /** * Function to update the news feed **/ function updateFeed(){ var id = 0; id = $('#feeds li:last').data('id'); $.ajax({ 'url' : '/ajax_results.cfm?ajax_type=get_site_feed', 'type' : 'POST', 'data' : { 'latest_news_time' : id, 'f_member_id_recipient': '5', 'use_feed_type' : '1,2,3,4,5,6,7,9,12,13,14,15,16,17,18,19,20,21,22', 'use_class_id' : '1,2,3,4' }, success : function(data){ setTimeout('updateFeed()', 1000); if(id != 0){ $(data).appendTo("#feeds ul"); } } }) }; </script>
@youresoshain
Copy link
Author

nm, i had banner ads that were breaking the screen height and causing the scroll when the target was $(window);. changed to a container.

@youresoshain
Copy link
Author

nope that didnt fix it either. hmm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant