I have a button. I click 3 times on
this button. I want show a yellow box
on first click, and hide the yellow
box and show a blue box instant of
that on second click , and hide blue
box and show a red box instant of blue
box on third click.
Is it possible with jQuery? How??
You can use the
toggle()method, which takes multiple functions as parameters and executes one for each click (in sequence)example at http://www.jsfiddle.net/4qsq4/
Keep in mind that this is a bit brute solution. If you could provide some of your HTML structure we could possibly automate this more.