Built-in pagination, with onclick event and active class change