ON MOUSE OVER DIV SCROLLING UP AND DOWN

COPY THIS CODE AND SAVE AS HTML..

ENJOY

<html>
<script type=”text/javascript”>
var scrolling = null;
var _speed = 12;
function doScrollUp()
{
var d = document.getElementById(‘scroller’);
d.scrollTop = d.scrollTop – _speed;
scrolling = window.setTimeout(function() {
doScrollUp();
}, 100);
}
function doScrollDown()
{
var d = document.getElementById(‘scroller’);
d.scrollTop = d.scrollTop + _speed;
scrolling = window.setTimeout(function() {
doScrollDown();
}, 100);
}
function doStopScroll()
{
window.clearTimeout(scrolling);
}
</script>
<body>
<h2>ON MOUSE OVER DIV SCROLLING UP AND DOWN</h2>
<div id=”scroller” style=”width:100%; height:100px; overflow:hidden;”>
<p style=”background-color:red; width:700px” >
1he top-level function, escape, encodes the string that is contained in <br>
the string argument to make it portable. A string is considered portable <br>
the string argument to make it portable. A string is considered portable <br>
the string argument to make it portable. A string is considered portable <br>
the string argument to make it portable. A string is considered portable <br>
if it can be transmitted across any network to any computer that <br
the string argument to make it portable. A string is considered portable <br>
the string argument to make it portable. A string is considered portable <br>
if it can be transmitted across any network to any computer that <br

</p>
<p style=”background-color:green;width:700px” >
We can use escape function in JavaScript to make a string portable <br>
to transmit it over a network. All the non ASCII characters are to be <br>
converted before sending them by using escape function. The escape function <br>
will replace these non ASCII characters to its two or four digit hex format. <br>
We can use escape function in JavaScript to make a string portable <br>
to transmit it over a network. All the non ASCII characters are to be <br>
converted before sending them by using escape function. The escape function <br>
will replace these non ASCII characters to its two or four digit hex format. <br>
We can use escape function in JavaScript to make a string portable <br>
to transmit it over a network. All the non ASCII characters are to be <br>
converted before sending them by using escape function. The escape function <br>
will replace these non ASCII characters to its two or four digit hex format. <br>
</p>
<p style=”background-color:pink;width:700px” >
1he top-level function, escape, encodes the string that is contained in <br>
the string argument to make it portable. A string is considered portable <br>
the string argument to make it portable. A string is considered portable <br>
the string argument to make it portable. A string is considered portable <br>
the string argument to make it portable. A string is considered portable <br>
if it can be transmitted across any network to any computer that <br
the string argument to make it portable. A string is considered portable <br>
the string argument to make it portable. A string is considered portable <br>
if it can be transmitted across any network to any computer that <br

</p>
<p style=”background-color:yellow;width:700px” >
We can use escape function in JavaScript to make a string portable <br>
to transmit it over a network. All the non ASCII characters are to be <br>
converted before sending them by using escape function. The escape function <br>
will replace these non ASCII characters to its two or four digit hex format. <br>
We can use escape function in JavaScript to make a string portable <br>
to transmit it over a network. All the non ASCII characters are to be <br>
converted before sending them by using escape function. The escape function <br>
will replace these non ASCII characters to its two or four digit hex format. <br>
We can use escape function in JavaScript to make a string portable <br>
to transmit it over a network. All the non ASCII characters are to be <br>
converted before sending them by using escape function. The escape function <br>
will replace these non ASCII characters to its two or four digit hex format. <br>
</p>

</div>
<div>
<input type=”button” value=”Scroll Up” onmouseover=”doScrollUp();” onmouseout=”doStopScroll();”>
<input type=”button” value=”Scroll Down” onmouseover=”doScrollDown();” onmouseout=”doStopScroll();”>

</div>
</body>
</html>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s