facebook or twitter style load more option
<p>I've been trying to create a facebook or twitter like load more option as an alternative for ordinary pagination. I've been trying to create a feature without any external plugins, just using jQuery alone. The load more option works fine minus one feature, that is scrolling the newly appended div element coming to users view.. I will add the codes and a jsfiddle link to show what I am trying to get here.</p>

<p><a href="http://jsfiddle.net/xFu3M/11/" rel="nofollow">JSfiddle</a></p>

<pre><code>$("#loadMore").on("click", function(e) {
    e.preventDefault();
    var divCollection = number;
    for (var k = 0; k &lt; 5; k++) {

        $("#loadMore").before("&lt;div class='subDivs' id='indID1" + number + "'&gt;" + number + "&lt;/div&gt;");
        number++;
    }
    alert("indID" + parseInt(divCollection));
    goToByScroll("indID" + parseInt(divCollection)); // try change to indID4
});

function goToByScroll(id) {
    var el = $('#' + id);
    console.log(el);
    var elOffs = el.offset().top;
    var parOffs = el.closest('.contentBody').offset().top;
    $('.contentBody').stop().animate({
        scrollTop: elOffs - parOffs
    }, 100);
}
</code></pre>
