jQuery UI switchClass()方法无法正常工作 [英] jQuery UI switchClass() method is not working properly

查看:193
本文介绍了jQuery UI switchClass()方法无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

jQuery UI switchClass()方法不切换类,而是执行一些不需要的动画,并且类保持与原来的一样,当我使用 jquery.animate-enhanced.js 用于硬件加速动画。


任何想法如何解决?

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 jquery.animate-enhanced.js for hardware accelerated animations.
Any Idea about how can I fix it?

推荐答案

我仍然不知道为什么switchClass有时不工作,但我有一个解决方法:

I still don't know why switchClass sometimes doesn't work, but I do have a workaround:

替换

switchClass('circle','square');

addClass('square').removeClass('circle');

希望有帮助。

这篇关于jQuery UI switchClass()方法无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆