I build a quick pagination from scratch it kind of works, but for the past half hour I've been trying to get the next and/or previous button to disable at the last page like this: (this one is for the next button)
if (currentPage.is(':last-child'))
{
$('.paj_next').prop('disabled', true);
$('.paj_previous').prop('disabled', false);
}
here is my code so you can try it out and see what's wrong for yourself:
When you click next it will go too far and not come back
Not exactly sure what's wrong, thanks a bunch in advance. JSFiddle scrambled up my code when I copied it in, sorry for it being so messy!
-Mike