Twitter like loading (Load More)

basically this is the most simplest way to load data in twitter way (Load more). for this i have not used jquery, mootools or any other fancy javascript framework. to use this you need very basic knowledge of javascript along with little ajax & php that’s it, so here we start
step 1: you html base
again i have kept this very simple.. just one div where you want to show your twitts. now heart of this code will be your javascript functions here we will use 2 javascript functions one to send request (AJAX) and another one to load your resulting twitts… also i have used 1 javascript variables to trace my twitts (pages)
i.e.
var page = 1;
lets start with first function
function getData(){
document.getElementById("div-Loading").className = "show";
document.getElementById("div-button").className = "hide";
remoteCall("php/ajax.php","page="+page,"loadData");
}below two lines are just hide the load more button and show loading image.
document.getElementById("div-Loading").className = "show";
document.getElementById("div-button").className = "hide";and this are simple Stylesheet classes to show and hide the content. Read more…