Javascript pagination library