I'm using jplist to add pagination and filtering to a hotel-listing page written in php. You can see an example here.
At the moment, I use a loop in php to create the list div, and the list-item divs within it.
It works OK, except that, initially, the php page loads and displays ALL the hotels (not just the first page) before jplist kicks in and replaces that with a paginated list of (in my case) 50 hotels.
I've looked at the various data-source options, but I'm not sure which, if any to choose and, if I do, if that will solve the problem.
I'm using jplist to add pagination and filtering to a hotel-listing page written in php. You can see an example here.
At the moment, I use a loop in php to create the list div, and the list-item divs within it.
It works OK, except that, initially, the php page loads and displays ALL the hotels (not just the first page) before jplist kicks in and replaces that with a paginated list of (in my case) 50 hotels.
I've looked at the various data-source options, but I'm not sure which, if any to choose and, if I do, if that will solve the problem.
What is the best way to avoid this double render?
Here's my code:
Javascript:
HTML/PHP: