[jQuery] .click function won't work continuously? addClass and hasClass little problem

2009-05-19 Thread Edwinistrator
I want to change the color on every click on the div, by changing the class and checking if hasClass. First removeClass, then addClass. But this won't work? Live demo: http://www.edwinistrator.com/stuff/jquery/ !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://

[jQuery] .click function won't work twice? addClass and hasClass little problem

2009-05-19 Thread Edwinistrator
I want to change the color on every click of the div, by changing the class and checking if hasClass. First removeClass, then addClass. But this won't work? Live demo: http://www.edwinistrator.com/stuff/jquery/ !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://