Welcome Guest, Not a member yet? Register   Sign In
Codeigniter + Infinity scroll help

(12-14-2018, 12:56 PM)HarrysR Wrote: As for this, i've tried it and
1) The jquery plugin didn't quite helped,

It is rare for "free code" to do exactly what you are looking for. Still, it usually provides usable ideas and some directional guidance. If you understand what the example is doing compared to what you want to do it is often possible to devise a custom solution.

(12-14-2018, 12:56 PM)HarrysR Wrote: 2) Every example i found (even for codeigniter) was about inserting table rows and not loading a whole view file.

It should be very easy to substitute <div> where the examples use <tr>. It is not important what kind of HTML element you are working with because in every case you are going to be using one of the JQuery DOM insertion or other DOM manipulation methods to do the work. That's true for both an "infinite scroll" or all new content due to a filter (dropdown) change.

(12-14-2018, 12:56 PM)HarrysR Wrote: 3) And the most important thing i didn't manage to find an example or even a brief explanation on how infinite scroll with dropdown filters work.

On the frontend, filtered (dropdowns) + infinite-scroll would use about the same approach as filtered pagination. The biggest difference being that filtered + infinite-scroll uses ajax to request and receive HTML while filtered + pagination uses redirection to get a completely new page of HTML.

At the backend the questions are the same:
  1. What data makes a page (filters)?
  2. How big is a page (how much data)?
  3. How many pages (n-pages) are there (given the filters and page size)
  4. Which page of n-pages should be returned?

Pagination returns a complete "view" while scrolling returns only the HTML of the new data.

Messages In This Thread
Codeigniter + Infinity scroll help - by HarrysR - 12-11-2018, 03:15 PM
RE: Codeigniter + Infinity scroll help - by dave friend - 12-14-2018, 04:03 PM

Theme © iAndrew 2016 - Forum software by © MyBB