Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery check if input is empty on keyup


http://jsfiddle.net/DKW7M/

HTML:
<input type="text" id="test" />
-----
JS:

$("#test").keyup(function() {
                var input = $(this);

                if( input.val() == "" ) {
                  input.css( "border", "1px solid #000" );
                }   
            });
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #jquery #check #input #empty #keyup
ADD COMMENT
Topic
Name
2+1 =