jQuery - how to write 'if not equal to' (opposite of ==)

Viewed 208432

I need to reverse of the following code. How can I make the animation run if the width is NOT 500px.

$(".image-div").not(this).each(function() {
        if ($(this).css('width') == '500px') {
            $(this).animate({
                    width: '250px'
                }, 500, function() {
                // Animation complete.
            });
        }


    });

In other words, what the opposite of this?: ==

Thanks

4 Answers
Related