JavaScript IF with AND/OR.. not working
        Posted  
        
            by nobosh
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by nobosh
        
        
        
        Published on 2010-06-01T04:10:27Z
        Indexed on 
            2010/06/01
            4:13 UTC
        
        
        Read the original article
        Hit count: 201
        
JavaScript
Can someone who is a master at JS tell me what's wrong with this?
if ( $.trim($("#add-box-text").val()).length < 2 && $.trim($("#add-box-text").val()) != "Click here to add an item" ) {
    // If it's LT than 1 Character, don't submit
    $("#add-box-text").effect('highlight', {color: '#BDC1C7'}, 500);
    // Refocus
    $("#add-box-text").focus();
}
© Stack Overflow or respective owner