jQuery UI switchClass() method doesn\'t switch class, rather it performs some undesired animations and the class remains the same as the original one when I use
$(function(){
$('#circle').click(function(){
$('.circle').switchClass('circle', 'square', 'slow');
$('.square').switchClass('square', 'circle', 'slow');
return: false
});
});
In this Example on the click of the #circle Div I am removing the .circle class from all objects and replacing it with the .square class. If the .circle class is not there to be removed then the .square class is removed and replaced with the .circle class. It is a toggle effect.
If you do no want the toggle just remove the top or bottom one.