infinite-ajax-scroll | existing pagination into infinite scrolling pages | Plugin library
kandi X-RAY | infinite-ajax-scroll Summary
kandi X-RAY | infinite-ajax-scroll Summary
Turn your existing pagination into infinite scrolling pages with ease. More features, documentation and examples available at:
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Load the next page
- Gets the root rect of an element .
- Create movie element .
- Returns the scroll position of a document .
- returns the index of the given element in the scrollLeft space
- Gets the page breakpoints array
- Layout the images in the dom
- Appends items to another parentNode .
- Calculates the scroll position of a scroll container .
- Handle scroll events
infinite-ajax-scroll Key Features
infinite-ajax-scroll Examples and Code Snippets
Community Discussions
Trending Discussions on infinite-ajax-scroll
QUESTION
I have applied the infinite-ajax-scroll to my project. It is a PHP Laravel project that displays a long list of divs. Instead of using pagination, I wanted to make the user see all results on the same page by scrolling down. I also have a filter for the results and it works well, but the strange thing is that after the results appear through filtering, scrolling down will lead to the appearance of all results without taking into account the current filter.
Can anyone advise on my best approach to this? I want to use the scrolling and it is something maybe realted to the url but I don't know how to fix this
Below is what I have so far.
// Filters
...ANSWER
Answered 2020-Aug-09 at 07:34function loadMoreData(page) {
var filters = searchFilters();
$.ajax({
url: '/restaurants/search?page=' + page,
data: filters, // <-- this was missing
beforeSend: function() {
$('.ajax-load').show();
}
}).done(function(data) {
if(data.html=="") {
$('.ajax-load').html("");
return;
}
$('.ajax-load').hide();
$(".loading_restaurants").append(data.html);
}).fail(function(jqXHR, ajaxOptions, thrownError) {
$('.ajax-load').html("server not responding...");
});
}
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install infinite-ajax-scroll
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page