I can't give you JQuery, but I can give a vanilla solution:
var div = document.getElementsByTagName('div');
div.addEventListener('click', funcOne);
function funcOne(){
div.style.backgroundColor = "blue";
div.removeEventListener('click', funcOne);
div.addEventListener('click', funcTwo);
}
function funcTwo(){
div.style.backgroundColor = "red";
div.removeEventListener('click', funcTwo);
div.addEventListener('click', funcOne);
}
This method has worked for me before and (the few times I've tried) the toggle() method has been a bit of a flop. So convert the above to JQuery and just run two (or more) click()'s in sequence.
If you want the color to change only on certain clicks, place the event listener add/remove (in funcOne() ) inside a counter that iterates every time funcOne occurs. Attach the counter to a variable, and when the counter = N (where n = the size of each interval in clicks), change the event listeners and reset the counter.