Script Categories













Background Effects >>> Fader.

This script, once started, will continuously loop the background color .

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

<SCRIPT LANGUAGE="Javascript">
/* Visit http://www.yaldex.com/ for full source code
and get more free JavaScript, CSS and DHTML scripts! */
<!-- Begin
var COLOR = 999999
var woot = 0;
var canDo=true;
function stoploop() {
document.bgColor = '#ffffff';
clearInterval(loopID);
canDo=true;
}
function Go() {
if (COLOR > 0) {
document.bgColor = '#' + COLOR
COLOR
-= 111111
} else {
document.bgColor = '#000000'
woot += 10
COLOR = 999999
COLOR -= woot

  
}
}
function loopBackground()
{
    if(canDo) loopID = setInterval("Go()",1);
canDo=false;
}
// End -->
</script>

<FORM NAME="background">
<table align="center"><tr><td>
<INPUT TYPE="button" VALUE="Start bgColor WARP"
onClick="loopBackground()">
</td><td>
<input type="button" value="Stop bgColor WARP" onClick="stoploop()">
</td></tr></table>
</FORM>
 

Get Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.



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




©