css two colors flashing js two ways to set color flashing
The first: random flickering
function changeColor() { var color="orange|#FFFFFF"; color=color.split("|"); $("#setxfld").css("background",color[parseInt(Math.random() * color.length)]); xfld.attr('fill',color[parseInt(Math.random() * color.length)]); }
setInterval('changeColor()',1000);
The second: orderly flashing
var colorFlag = 0; function changeColor() { if (!colorFlag) { $("#setxfld").css("background","#FF9B1A"); colorFlag = 1; }else{
…
The post css two color flashing js two ways to set color flashing first appeared on Lenix Blog .
This article is reprinted from https://blog.p2hp.com/archives/8976
This site is for inclusion only, and the copyright belongs to the original author.