*NOTE - this is based on 1.8.2/jquery.min.js"
<script type="text/javascript">
function startSpotLight()
{
$("#AnimateMe").animate({
"margin-top" : "-725px"}, 20000, 'linear');
}
function stopSpotLight()
{
var myDiv = $("#AnimateMe");
myDiv.clearQueue();
myDiv.stop();
}
function setSpotLightStream(pause)
{
document.getElementById('AnimateMe').style.marginTop=pause;
startSpotLight();
}
</script>
HTML Later on...
<div id="AnimateMe" onmouseover="javascript: stopSpotLight();" onmouseout="javascript: setSpotLightStream(document.getElementById(this.id).style.marginTop);startSpotLight();">
<!--IMAGES-->
</div>
No comments:
Post a Comment