I have a scroller working on my page, the ploblem is that I want the hand cursor to show over a link.
I realize usng setTimeout will cause the cursor to flash so I want to stop the scrolling on Mouseover.
here's my feeble attempt;
js file
here's my html file
Any help would be much appreciated the page can been seen at
Glen
I realize usng setTimeout will cause the cursor to flash so I want to stop the scrolling on Mouseover.
here's my feeble attempt;
js file
Code:
var DefScrollSpeed = 1;
var DefScrollDirection = 'horizontal'; // (horizontal, vertical)
function BGScroller(ID, SD, SS, BG)
{
Elem = GetElem(ID);
if(!Elem)
{
return false;
}
else
{
if(BG)
{
Elem.style.backgroundImage = 'url("' + BG + '")';
}
SS = SS ? SS : DefScrollSpeed;
SD = SD ? SD : DefScrollDirection;
BGScroll(ID, SD, SS, 0);
}
}
function BGScroll(ID, SD, SS, Pos)
{
Elem = GetElem(ID);
Elem.style.backgroundPosition = (SD == 'horizontal') ? Pos++ : '0 ' + Pos++;
window.setTimeout('BGScroll("' + ID + '", "' + SD + '", ' + SS + ', ' + Pos + ' )', SS);
}
function BGScrollerInit()
{
BGScroller("logoCont", 'horizontal', 100, 'images/bannerbg.jpg');
}
function GetElem(ID)
{
return document.all ? document.all[ID] : (document.getElementById(ID) ? document.getElementById(ID) : false);
}
function stopScroll()
{
clearTimeout('BGScroll("' + ID + '", "' + SD + '", ' + SS + ', ' + Pos + ' )', SS);
}
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Ezras Soccer World</title>
<SCRIPT LANGUAGE="JAVASCRIPT" SRC="JScript/scroll.js"TYPE="text/javascript"></SCRIPT>
<link rel="stylesheet" href="soccer.css" type="text/css">
<script LANGUAGE="JAVASCRIPT">
// preload image background
Image1=new Image(1062,187);
Image1.src="images/bannerbg.jpg";
</script>
</head>
<body onLoad="BGScrollerInit()">
<div id = "logoCont">
<a href = "[URL unfurl="true"]http://www.microsoft.com"[/URL] target = "_blank">
<div id = "logo1" onMouseOver = "stopScroll()">test1</div></a>
<div id = "logo2">test2</div>
</div>
</body>
</html>
Glen