Skip to content

Instantly share code, notes, and snippets.

@paulanunda
Last active December 20, 2015 03:58
Show Gist options
  • Save paulanunda/6066941 to your computer and use it in GitHub Desktop.
Save paulanunda/6066941 to your computer and use it in GitHub Desktop.
<script style="text/javascript">
$(document).ready(function(){
// resize bg
$(window).resize(function(){
$('#wrap').css('height', $(window).height()-55)
}).trigger('resize');
// scroll down animation
$('.down-btn').click(function(){
$('html, body').animate({
scrollTop: $(".home_below").offset().top
}, 1000);
return false;
});
});
</script>
<style type="text/css">
#wrap {
background-color: #f2f3f5;
background-image: url('assets/hands-1500x1000.jpg');
background-repeat:no-repeat;
background-position:center;
background-size:cover;
}
</style>
- Page Refresh
<script>
var timeout = setTimeout("location.reload(true);",20000);
function resetTimeout() {
clearTimeout(timeout);
timeout = setTimeout("location.reload(true);",20000);
}
</script>
regex
request.url.match(/[?].*/)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment