Hy Guys,
What I am doing with the following code is convert a manually (by user clicks) navigated paginated table rows into auto advance by simulating user clicks on Previous -Next pagination buttons.
I used following setInterval function to advance to next page by simulating a mouse click on Next button "#tablepress-1_next" and that works fine.
window.setInterval(function()
{
$('#tablepress-1_next').triggerHandler('click');
}, 6000);
});
Now I would like to navigate backwards by simulating user click on "Previous" button but that a bit too much for me as I am jquery noob. Can anybuddy help modify the above function so that it simulate click on "Previous" button ("#tablepress-1_prev") when all rows have been advanced forwardly or may be start again from Page-1 rather than navigating backwards-2-forward.
Tablepress adds a "disabled" class to "Previous"button if it's Page-1 and to "Next" button if it's the last page.
Tablepress is a wordpress plugin.
Thanks Regards, dkj