我需要反转以下代码.如果宽度不是500px,我该如何使动画运行.
$(".image-div").not(this).each(function() {
if ($(this).css('width') == '500px') {
$(this).animate({
width: '250px'
}, 500, function() {
// Animation complete.
});
}
});
Run Code Online (Sandbox Code Playgroud)
换句话说,与此相反的是什么?:==
谢谢
Bra*_*tie 18
!=
Run Code Online (Sandbox Code Playgroud)
例如,
if ("apple" != "orange")
// true, the string "apple" is not equal to the string "orange"
Run Code Online (Sandbox Code Playgroud)
意思不是.另请参见逻辑运算符列表.此外,当您看到三重字符时,它是一种类型敏感的比较.(例如if (1 === '1')[不相等])