Click here to Skip to main content
15,891,744 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how we can change the cells bgcolor in table with timer like slide show
Posted

1 solution

Try this once

JavaScript
var count=0;
var time;
var timer_is_on=0;
setTimeout("timedCount();", 3000);

function timedCount()
{
    if(count == 6){    

    document.getElementById('blinkyellow').style.backgroundColor = "yellow";

    }

count=count+1;
time=setTimeout("timedCount()",1000);

}

function doTimer()
{
if (!timer_is_on)
  {
  timer_is_on=1;
  timedCount();
  }

}


Also change the class on the td to an id like this

HTML
<table><tbody><tr><td id="blinkyellow">Col 1</td></tr></tbody></table>


Hope it will help you
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900