Skip to content

Instantly share code, notes, and snippets.

@karlwestin
Created August 14, 2014 14:49
Show Gist options
  • Save karlwestin/706480b35273945b7813 to your computer and use it in GitHub Desktop.
Save karlwestin/706480b35273945b7813 to your computer and use it in GitHub Desktop.
link: function(scope, element, attrs, scrollViewCtrl) {
var el = element[0],
parent = el.parentNode,
trigger = false,
topIndicator = document.createElement("div"),
bottomIndicator = document.createElement("div"),
topText = "Pull to load more…",
bottomText = "Scroll to load more…",
loadMoreText = "Release to load more…",
loadingText = "Loading…";
topIndicator.className = "pull-to-load text-micro text-quiet";
parent.insertBefore(topIndicator, el);
parent.appendChild(bottomIndicator);
topIndicator.innerText = topText;
bottomIndicator.innerText = topText;
function resetIndicators() {
topIndicator.innerText = topText;
bottomIndicator.innerText = bottomText;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment