Note that there are some explanatory texts on larger screens.

plurals
  1. POAuto Load previous posts when scrolled to the bottom
    primarykey
    data
    text
    <p>Well, on my website.. load previous posts is already configured BUT WHEN TRIGGERED WITH A CLICK ON PARTICULAR LINK...</p> <p>Now, the requirement is to load the previous posts on scroll down (AS IN FACEBOOK AND TWITTER...) </p> <p>This is the source of the link which when clicked loads previous posts</p> <pre><code>&lt;a id="more_&lt;?php echo @$next_records?&gt;" href="javascript: void(0)" class="more_records"&gt; &lt;div id="bottomMoreLink"&gt; Dig More... &lt;/div&gt; &lt;/a&gt; </code></pre> <p>Now as this code doesn't include a function name, there is a script which has got the same class as this one to handle the request.. which is as under..</p> <pre><code>&lt;script type="text/javascript"&gt; $(document).ready(function(){ $('a.more_records').livequery("click", function(e) { SOME CUSTOM CODE TO LOAD POSTS.. }); }): &lt;/script&gt; </code></pre> <p>Now as per the requirement... I have two things to do..</p> <ol> <li>Detect the user has scrolled down to the end of the page.</li> </ol> <p>This can be done as follows...</p> <pre><code>&lt;scrtip type="text/javascript"&gt; $(window).scroll(function(){ if($(window).scrollTop() == $(document).height() - $(window).height()) { lastRow(); } }); &lt;/script&gt; </code></pre> <ol> <li>Trigger the thing that loads previous posts.. if the user has scrolled to the bottom of the page</li> </ol> <p>THIS IS WHERE I AM LOOKING FOR SOME HELP, WHICH IS CURRENTLY BEING DONE BY A CLICK .. am not able to figure out how to trigger the code in second block above..</p> <p>Please suggest something.. I am completely unaware of jquery/javascript, so describe briefly</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload