Comments (5)
I don't see a reason why you couldn't use a general infinite scroll solution in this case.
from salvattore.
The error is here:
salvattore['append_elements'](container, [newElements]);
It should be:
salvattore['append_elements'](container, newElements);
Let me know how it went.
from salvattore.
bump
from salvattore.
bump - any updates on this?
from salvattore.
The callback function of Infinite Scroll should reference the grid as a DOM element, not a jQuery object, and pass the new elements as such:
$('#grid').infinitescroll({
appendCallback: false
},
function(newElements) {
salvattore['append_elements'](document.getElementById('grid'), newElements);
});
Then update line :257 of salvattore.js:
elements.forEach(function append_to_next_fragment(element) {
Which is attempting to loop over an object as an array, causing all sorts of problems, to the code below (which is used in the immediately following function anyway):
Array.prototype.forEach.call(elements, function append_to_next_fragment(element) {
This works for me. I may have totally missed something obvious, and it may very well be that the actualy plugin code itself needs no updating, but this got it working for me. I'm going to create a pull request just incase this is actually the correct fix
from salvattore.
Related Issues (20)
- 'Working' on Safari and not on other browsers
- GET Paramater no class
- Adding columnsChange dispatch after init HOT 1
- Salvattore not distributing the elements between columns
- Parent divs being removed HOT 1
- Having problem using "grid" data-columns in Wordpress with Be Theme
- Twitter Widget gets removed on Android and MS Edge
- Feature website
- Nesting with two versions of the script HOT 1
- Most example sites go to spam sites
- Github 'examples' doesnt work
- Feature website - www.HazAlerts.com.au
- Feature website - ThemesMatic.com
- how to add filter on salvattore, like the functinality of isotope?
- salvattore is searching for Maintainers! HOT 1
- Feature website: https://rolplus.net/publicaciones
- [PROBLEM] Need a first DIV width like 2 column and not 1
- Salvattore and Lazyload
- Columns not changing when resizing window - only on reload
- Feature website - wastedyouth.club
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from salvattore.