Script Categories













Messages >>> Mouse Banner2.

Another way to display a banner behind the cursor. It's easy to change the font, size or color.

Add the below code to the <body> section of your page:

<script language="javascript" type="text/javascript">      
/* Visit http://www.yaldex.com/ for full source code
and get more free JavaScript, CSS and DHTML scripts! */
<!-- Begin
message = 'JavaScript is so cool!';
FonT = 'Verdana';
ColoR = 'red';
SizE = 3; //1 to 7 only!

var amount = 5, ypos =- 50, xpos = 0, Ay = 0, Ax = 0, By = 0, Bx = 0, Cy = 0, Cx = 0, Dy = 0, Dx = 0, Ey = 0, Ex = 0;
document.write("<div id='outer' style='position:absolute;top:0px;left:0px'>");
document.write("<div style='position:relative'>");
for (i = 0; i < amount; i++) {
document.write('<div id="text'+i+'" style="position:absolute;top:0px;left:0px;width:400px;height:20px"><font face='+FonT+' size='+SizE+' color='+ColoR+'>'+message+'</font></div>')
}
document.write("</div>");
document.write("</div>");
if (!document.all) {
window.captureEvents(Event.MOUSEMOVE);
function nsmouse(evnt) {
xpos = evnt.pageX + 20;
ypos = evnt.pageY + 20;
}
window.onmousemove = nsmouse;
}
else  {
function iemouse() {
ypos = event.y + 20;
xpos = event.x + 20;
}
window.document.onmousemove = iemouse;
}
function makefollow() {
if (!document.all) {
document.getElementById('outer').style.top = window.pageY;
document.getElementById('text0').style.top = ay;
document.getElementById('text0').style.left = ax;
document.getElementById('text1').style.top = by;
document.getElementById('text1').style.left = bx;
document.getElementById('text2').style.top = cy;
document.getElementById('text2').style.left = cx;
document.getElementById('text3').style.top = Dy;
document.getElementById('text3').style.left = Dx;
document.getElementById('text4').style.top = Ey;
document.getElementById('text4').style.left = Ex;
}
else {
document.getElementById('outer').style.pixelTop = document.body.scrollTop;
document.getElementById('text0').style.pixelTop = ay;
document.getElementById('text0').style.pixelLeft = ax;
document.getElementById('text1').style.pixelTop = by;
document.getElementById('text1').style.pixelLeft = bx;
document.getElementById('text2').style.pixelTop = cy;
document.getElementById('text2').style.pixelLeft = cx;
document.getElementById('text3').style.pixelTop = Dy;
document.getElementById('text3').style.pixelLeft = Dx;
document.getElementById('text4').style.pixelTop = Ey;
document.getElementById('text4').style.pixelLeft = Ex;
//}
}
}
function move() {
ey = Ey += (ypos - Ey) * 0.2;
ex = Ex += (xpos - Ex) * 0.2;
dy = Dy += (ey - Dy) * 0.3;
dx = Dx += (ex - Dx) * 0.3;
cy = Cy += (dy - Cy) * 0.4;
cx = Cx += (dx - Cx) * 0.4;
by = By += (cy - By) * 0.5;
bx = Bx += (cx - Bx) * 0.5;
ay = Ay += (by - Ay) * 0.6;
ax = Ax += (bx - Ax) * 0.6;
makefollow();
setTimeout('move()', 10);
}
window.onload=move;
//  End -->
</script>

JavaScript Editor Get Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.



Code was highlighted by 1st JavaScript Editor (The Best JavaScript Editor!).

http://www.cashadvance-loans.net/texas/cash-advance-coppell-tx/


©