Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3495294
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:06:33+00:00 2026-05-18T12:06:33+00:00

Go here: http://www.infinite-scroll.com/ Play with the infinite scroll. Notice that you can’t click a

  • 0

Go here: http://www.infinite-scroll.com/
Play with the infinite scroll. Notice that you can’t click a link and then hit “back”. It has glitches when you do that.

So, I plan on writing my own Infinite scroll.

  • When the user gets to the bottom, load an AJAX call. Then do a JQuery “append” the result to the div. Then, call my other functions on those elements. (I set the background images of all those elements in javascript).

Will this work? If I do that…will I be able to handle the back button?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T12:06:34+00:00Added an answer on May 18, 2026 at 12:06 pm

    I considered the very same thing on a project I worked on. One option I thought about was to allow the back button to return to the place where the link was clicked (just like normal browsing).

    Firstly, you need to record what page of the infinite scrolling your on so that you can load up to that section again. You can do this with some clever playing around with the window.location.hash value. If you look at my answer to this question, I explain in more detail how to do it in plain JavaScript or jQuery using Asual’s address plugin.

    The basic part of it would like like this:

    // Whatever you're using to load the next page
    function scrollToNextPage(page){
       // Your infinite scrolling stuff
       $.address.parameter("currentPage", page);
    }
    
    $.address.externalChange(function(){
       var page = $.address.parameter("currentPage"),
           top = $.address.parameter("linkTop");
    
       loadAjaxUpTo(page);   
       $('html, body').animate({ scrollTop: top }, 500);
    });
    
    // Set a parameter for the location of a clicked link
    $("a").live('click', function(){
       $.address.parameter("linkTop", $(this).scrollTop());
    });
    

    I didn’t implement the last bit (getting the position of the link clicked) but I can’t see why it wouldn’t work. It would cause the window to scroll nicely to where you where. You can always set it with an anchor to the loaded page instead (but when you scroll to it, it will always go to the top of the page).

    A couple of points though, I wouldn’t recommend this. At least for the project I was doing, it wasn’t really necessary. In my project, we expected the user to go back to change their options and figured that scrolling wouldn’t be a problem (although we didn’t have that many pages to scroll through). The AJAX (and your JavaScript to set the images) needs to be loaded and executed again which takes a lot of time depending on how many pages you need to reload. On top of the time to scroll to the link (you could just window.scrollTo but you don’t get animation so everything is very jerky. You could always just load the page the person was on and forget about the previous pages, but you’re still breaking the user experience that way. Or (what I tried) was to implement a two way infinite scroll. So it would load the page the user clicked from and prepend the previous pages if they scrolled up – this was too much work for what it was though.

    Another point is that, if you were to still do it, you want to use a GET request to get your pages (and make sure the cache isn’t set to expire immediately). I found that pages requested by Ajax with the GET request would take from the cache (at least on some of the browsers I tried). Sending your details over a POST will always ignore the cache.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If you go here : http://www.filamentgroup.com/lab/update_jquery_ui_slider_from_a_select_element_now_with_aria_support// Then click and drag the second slider over
I read here: http://www.androidguys.com/2009/10/11/developers-can-now-target-by-carrier-in-android-market/ that it can be done if you go to the
So I have this page here: http://www.eminentmedia.com/development/powercity/ As you can see when you mouse
I can't see it as mentioned here: http://www.c-sharpcorner.com/uploadfile/mahesh/dll12222005064058am/dll.aspx Do I have to activate somehow
Trying to implement the excellent jQuery bidirectional infite scroll as explained here: http://www.bennadel.com/blog/1803-Creating-A-Bidirectional-Infinite-Scroll-Page-With-jQuery-And-ColdFusion.htm For
I need to combine Expression Engine with http://www.infinite-scroll.com . I have tried numerous ways
As you can see here: http://www.responsinator.com/?url=www.vaneldijk.nl there is an extra space on lower resolution
I read this article here http://www.codeproject.com/KB/web-security/RolesFormsAuthorization.aspx What is the limitation of Membership that would
UCL can be found here: http://www.oberhumer.com/opensource/ucl/ I am wondering if there is a Python
If you visit here: http://www.egyptevakantie.nl/dahab , click on the andere plaatsen tab, and then

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.