hey guys
i have a simple pagination pagination code that had been writen with raw javascript codes
function ChangeForumPage(e){
if(busy == 0)
{
switch(e)
{
case "Next":
page = p+1;
p++;
break;
case "Prev":
if(p>1)
{
page = p-1;
p--;
}
break;
}
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
{
alert ("Your browser does not support AJAX!");
return;
}
var url="MTForumsBlock.php?req=LastTopics&p="+page;
xmlHttp.onreadystatechange=ChangeForumPageProces;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
}
function ChangeForumPageProces(e){
if(xmlHttp.readyState==4)
{
document.getElementById("MTForumBlock").innerHTML=xmlHttp.responseText;
document.getElementById("MTFloader").innerHTML='';
busy = 0;
}else{
document.getElementById("MTFloader").innerHTML='<img src="images/loader.gif" />';
busy = 1;
}
}
and i need to have the same possiblity with jquery
but i don know how to do that !
it should only change the page if i click next or previous button