我需要反转下面的代码。如果宽度不是500px,我如何使动画运行。
$(".image-div").not(this).each(function() { if ($(this).css('width') == '500px') { $(this).animate({ width: '250px' },500,function() { // Animation complete. }); } });
换句话说,与此相反的是:==
谢谢
解决方法
==比较运算符的相反是!=。