»
EnglishFrenchVietnamese

Print - Scrolling background image - JavaScriptBank.com

Full version: jsB@nk » Background » Scrolling background image
URL: https://www.javascriptbank.com/scrolling-background-image.html

Scrolling background image © JavaScriptBank.comThe effect makes background image autimatically float up/down when clicking the specified link.

Full version: jsB@nk » Background » Scrolling background image
URL: https://www.javascriptbank.com/scrolling-background-image.html



JavaScript
<script language="javascript">/*     This script downloaded from www.JavaScriptBank.com     Come to view and download over 2000+ free javascript at www.JavaScriptBank.com*/<!--function sup(size){var maxsize=size;var backgroundOffset=size;clearInterval(ScrollTimer);ScrollTimer=window.setInterval("scrollup()",64);return;}function scrollup(){ backgroundOffset-=1; if (backgroundOffset<0) backgroundOffset=maxsize; document.body.style.backgroundPosition="0 "+backgroundOffset;}function sdown(size){var maxsize=size;var backgroundOffset=0;clearInterval(ScrollTimer);ScrollTimer=window.setInterval("scrolldown()",64);return;}function scrolldown(){ backgroundOffset+=1; if (backgroundOffset>maxsize) backgroundOffset=0; document.body.style.backgroundPosition="0 "+backgroundOffset;}var maxsize=138;var backgroundOffset=0;var ScrollTimer=window.setInterval("scrollup()",64);// --></SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->