There could be many ways to do that. If only you put in a little thought to
it :).
This is one of the ways, I am sure this is not the best way, but it surely
should meet your demands.
$("#btnTraffic").click(function(){
var tr_id = "#trafficLight";
if ( $(tr_id).css('background-col
here is my problem:
$("#btnTraffic").click(function(){
$("#trafficLight").css("background-color","yellow");
});
btnTraffic is my button, when I click it, it changes from red to
yellow because of the css.
I want to click it multiple times and have it rotate between red,
yellow and green.
so
2 matches
Mail list logo