I have 3 images that I want to switch between. I put each one of them in a class & change it\'s image in the css. I can now switch between 2 classes but when I add the
Example fiddle: http://jsfiddle.net/KdfEV/
This code will allow you to cycle through a sequence of defined classes
$('.one, .two, .three').click(function() { this.className = { three : 'one', one: 'two', two: 'three' }[this.className]; });