Adding ajax pagination

this is wrong, what if you are on 0 already... you will go to -1, you should use min values