Automatic Scrollbar Moving

Written by @kerixa 21 August 2012

This code moves your scroll bar automatically in slow mode. It is cool for reading!

Code Snippet:

                                                
                                                <!-- this script is provided by www.javascriptfreecode.com coded by: Kerixa Inc. -->
<script language="JavaScript1.2">
var currentpos=0,alt=1,curpos1=0,curpos2=-1
function initialize(){
startit()
}
function scrollwindow(){
if (document.all)
temp=document.body.scrollTop
else
temp=window.pageYOffset
if (alt==0)
alt=1
else
alt=0
if (alt==0)
curpos1=temp
else
curpos2=temp
if (curpos1!=curpos2){
if (document.all)
currentpos=document.body.scrollTop+1
else
currentpos=window.pageYOffset+1
window.scroll(0,currentpos)
}
else{
currentpos=0
window.scroll(0,currentpos)
}
}
function startit(){
setInterval("scrollwindow()",10)
}
window.onload=initialize
</script>
http://JavaScriptfreecode.com<br>
http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<br>http://JavaScriptfreecode.com<a target='_blank' href='www.javascriptfreecode.com' style='font-size: 8pt; text-decoration: none'>JavaScript Best Codes</a>                                                
                                            

Example:


About @kerixa

I am Krishna Eydat. I studied Software Engineering at University of Waterloo in Canada. I lead a few tech companies. I am passionate about the way we are connected. I would like to be part of something big or be the big deal!

K

Comments


Here you can leave us commments. Let us know what you think about this code tutorial!

0 / 300

TRENDING POST
1
2
3
4
5
VISITORS
Online Users: 12
Recent Members: Shahmeer, coolcoco7, SmitaPatil25, owoboycute, 092010
advertisement 2