I'm trying to learn to code Tumblr themes (I have no money for Wordpress), and I'd like to figure out how to implement "infinite/endless scroll" (as opposed to pagination) of posts; I'd rather not use either of the 2 main infinite scroll scripts because infinite-scroll-js
(by Paul Irish) is fairly well-documented (I was able to get it working) but I would like more control over the way the posts are loaded, so to speak, and Cody Sherman's infinite scroll code is not documented at all, and I have no idea how it should be used (the widely varying instructions are distributed by several noncoders who less of a grasp on Javascript than I do, and that's saying something).
I don't know any Ajax, but I am willing to read as much JS documentation as needed. Could I possibly use the following sequence when adding posts out of the blue, or do I need to understand Ajax like Paul Irish?
Onload: (of body)
Get all of the .post elements (with children), remove them from the DOM whilst adding them to a var that's basically just a list (array? JS term?) of posts
Load some computed # of posts (there would be an algorithm for this, probably based off post height or something, or perhaps dynamically measuring them as they come)/add them to the Masonry container, animated, when the user scrolls to the bottom of either the page, body, or Masonry container (haven't decided which yet)
Is this plausible or would I be wasting my time?