Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title></title>
<style type="text/css">
#memoryticker{
background-color: lightyellow;
width: 450px;
font: bold 12px Verdana;
/*Tip: add in height attribute here for multiple line scroller*/
border: 1px solid black;
padding: 3px;
/*Change 0.7 below to a different number if desired (0.7=0.7 seconds)*/
/*Remove below line to remove transitional effect in IE. Below line should always appear last within this CSS*/
filter: progid:DXImageTransform.Microsoft.GradientWipe(GradientSize=1.0 Duration=0.7)
}
#memoryticker1{
background-color: lightyellow;
width: 450px;
font: bold 12px Verdana;
/*Tip: add in height attribute here for multiple line scroller*/
border: 1px solid black;
padding: 3px;
/*Change 0.7 below to a different number if desired (0.7=0.7 seconds)*/
/*Remove below line to remove transitional effect in IE. Below line should always appear last within this CSS*/
filter: progid:DXImageTransform.Microsoft.GradientWipe(GradientSize=1.0 Duration=0.7)
}
</style></head>
<body>
<div id="memoryticker" ></div>
<div id="memoryticker1" ></div>
<script type="text/javascript">
/*<![CDATA[*/
function Ticker(o){
this.obj=document.getElementById(o.ID);
this.nme=o.ID;
this.ms=o.tickdelay||3000;
this.ary=o.tickercontents;
this.cnt=0;
this.cng();
}
Ticker.prototype={
cng:function(){
if (this.obj.filters && this.obj.filters.length>0){
this.obj.filters[0].Apply()
}
this.obj.innerHTML=this.ary[this.cnt]
if (this.obj.filters && this.obj.filters.length>0){
this.obj.filters[0].Play()
}
this.cnt=(this.cnt==this.ary.length-1)? this.cnt=0 : this.cnt+1
var filterduration=(this.obj.filters&&this.obj.filters.length>0)? this.obj.filters[0].duration*1000 : 0
var oop=this;
setTimeout(function(){ oop.cng(); },this.ms+filterduration)
}
}
new Ticker({
ID:'memoryticker',
tickercontents:[
'1) <a href="http://www.javascriptkit.com">JavaScriptKit.com</a>- JavaScript tutorials and scripts.</a>',
'2) <a href="http://www.codingforums.com">Coding Forums</a>- Web coding and development forums.</a>',
'3) <a href="http://www.dynamicdrive.com">DynamicDrive.com</a>- Award winning, original DHTML scripts.</a>',
'4) <a href="http://www.freewarejava.com">FreewareJava</a>- Free Java applets, tutorials, and resources.</a>'
],
tickdelay:2000,
persistdays:1
});
new Ticker({
ID:'memoryticker1',
tickercontents:[
'1) <a href="http://www.javascriptkit.com">JavaScriptKit.com</a>- JavaScript tutorials and scripts.</a>',
'2) <a href="http://www.codingforums.com">Coding Forums</a>- Web coding and development forums.</a>',
'3) <a href="http://www.dynamicdrive.com">DynamicDrive.com</a>- Award winning, original DHTML scripts.</a>',
'4) <a href="http://www.freewarejava.com">FreewareJava</a>- Free Java applets, tutorials, and resources.</a>'
],
tickdelay:3000,
persistdays:1
});
/*]]>*/
</script>
</body>
</html>
I can add persistance if required
Bookmarks