我只是使用带有逻辑运算符的 If 语句。我不知道为什么它显示 sytax 错误。
var divWidth = $("#columnwraper").width(); //getting the width of the div   
$("#right-button").click(function() {
    if (cursor != totalWidth && totalWidth !< divWidth) {
        $box2.animate({
            marginLeft : "-=300"
        }, "fast");
        cursor += 100;
    }
    // console.log(colwidth.width());
});
它表明
[15:18:24.050] SyntaxError: missing ) 条件后。
我在这里做错了什么?