语法错误 - 逻辑if语句

Ash*_*Ash 1 javascript jquery if-statement logical-operators

我只是使用带有逻辑运算符的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());
});
Run Code Online (Sandbox Code Playgroud)

它表明了这一点

[15:18:24.050]条件后的SyntaxError:missing).

我在这做错了什么?

Tee*_*emu 8

这样说吧:

if (cursor != totalWidth && !(totalWidth < divWidth))
Run Code Online (Sandbox Code Playgroud)

!<不是运营商.