http://students.gctaa.net/~snicholakos/webgraphics/jquery_ex1.html
Also, I quickly looked at the JQuery zoo which was very useful and I found this function which may come in handy
$.fn.toggleClick = function() {
var events = arguments;
var iteration = 0;
return $(this).click(function() {
events[iteration].apply(this, arguments);
iteration = (iteration + 1) % events.length;
});
};