If there is a click event, toggle() attaches functions to toggle. So, on first click first action occurs, on second, second action and so on.
<button>Change my color on each click</button>
<script>
$(document).ready(function(){
$("button").toggle(
function(){$("button").css({"color": "blue"});},
function(){$("button").css({"color": "yellow"});},
function(){$("button").css({"color": "red"});
});
});
</script>