Admin Js Paginating Customization
after footer in listing page like (Post.php)
<!– start paging –>
<?php
$page=0;
if(isset($_GET[‘page’])){
$page=$_GET[‘page’];
}
?>
<script language=”javascript” type=”text/javascript”>
window.setTimeout(“runpaging()”,5000);
function runpaging(){
<?php if($page>3){?>
for(var x=3;x<<?=$page?>;x++)
{
$(“.dataTables_paginate li” ).each(function( index ) {
if(index==’4′)
{
$(this).click();
}
});
}
<?php }else{?>
$(“.dataTables_paginate li” ).each(function( index ) {
if(index=='<?=$page?>’)
{
$(this).click();
}
});
<?php }?>
}
function editactionset(id){
//console.log($(“.dataTables_paginate .active a”).html());
var page=$(“.dataTables_paginate .active a”).html();
window.location.href=”editpost.html?id=”+id+”&page=”+page;
}
</script>
<!– end paging –>
and on edit page from where you want to back like(editpost.php)
add back button link with page=<?php echo $_GET[‘page’]?>