JavaScript IF with AND/OR.. not working
- by nobosh
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();
}