Skip to content

Instantly share code, notes, and snippets.

@KTamas
Created June 21, 2012 09:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KTamas/2964929 to your computer and use it in GitHub Desktop.
Save KTamas/2964929 to your computer and use it in GitHub Desktop.
<html>
<head>
<script src="http://code.jquery.com/jquery-1.7.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$(document).scroll(function(e) {
if ($('body').scrollTop() < 0) {
$('#refreshing').show();
setTimeout(function(){location.reload(true)}, 1000);
}
});
});
</script>
<style>
#refreshing {
display: none;
}
</style>
<body>
<div id="refreshing">Frissulunk!</div>
<div id="content">Foobarbaz</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment