Created
July 26, 2010 19:48
-
-
Save paul-english/491124 to your computer and use it in GitHub Desktop.
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
{% wire id="more-results" action={moreresults result=result target="list-articles" template="_article_summary.tpl"} %} | |
<p style="display:none;"><a href="javascript:void(0);" id="more-results">More results...</a></p> | |
<script> | |
$(function() { | |
// PE - this is all a hack, anyone know a better way to do this? | |
var firedOnce = false; | |
$(document).scroll(function(e) { | |
if ($(window).scrollTop() >= $(document).height() - $(window).height() - 200) { | |
if (!firedOnce) { | |
console.log("go!"); | |
firedOnce = true; | |
$('#more-results').click(); | |
setTimeout(function() { firedOnce = false; }, 2000); | |
} | |
} | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment