Question: Im trying to add CSS to a input on keyup. If the input is empty add CSS. I've tried this...

```
            $(input).keyup(function() {
                var input = $(this).attr('id');
                if( input == "" ) {
                  $(input).css( "border", "1px solid #FB9E25" );
                }   
            });

```

Answer: 
Try this:

```
$('input').keyup(function() {
            var input = $(this).attr('id');
            if( input == "" || input == null) {
              $(this).css( "border", "1px solid #FB9E25" );
            }   
        });

```
Try to use different name:

```
$(input).keyup(function() {
    var inputId = $(this).attr('id');
    if( inputId == "" ) {
        $(input).css( "border", "1px solid #FB9E25" );
    }   
});

```