Created
November 18, 2019 05:59
-
-
Save webharvy/ad17d2da5d657a688416e3cd56a517cf to your computer and use it in GitHub Desktop.
Google Jobs : codes for pagination / collating
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Code for pagination (scroll) | |
els = document.getElementsByTagName("ul"); | |
el = els[els.length-1]; | |
el.children[el.childElementCount-1].scrollIntoView(); | |
// Code for collating listings | |
groups = document.getElementsByTagName("ul"); | |
parent = groups[0]; | |
for (var i = groups.length - 1; i >= 1; i--) { | |
var children = groups[i].children; | |
for (var j = children.length - 1; j >= 0; j--) { | |
parent.appendChild(children[j]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment