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
switchClass()
I have encountered this problem before and wasted many hours trying to figure out what was going wrong.
I still don't know why switchClass sometimes doesn't work, but I do have a workaround:
Replace
switchClass('circle','square');
with
addClass('square').removeClass('circle');
Hope that helps.