Search
 
SCRIPT & CODE EXAMPLE
 

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" );
                }   
            });
Comment

PREVIOUS NEXT
Code Example
Javascript :: Convert pixels to number js 
Javascript :: Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.4.6/$injector/modulerr?p0=myApp 
Javascript :: adding hbs partials in express.js 
Javascript :: react native test redux 
Javascript :: javascript find area of triangle 
Javascript :: print json object 
Javascript :: spring boot map json to object in controller 
Javascript :: react-native-dropdown-picker for form react native 
Javascript :: Nestjs services update example 
Javascript :: prop type for component react js 
Javascript :: send embed with webhook in JS 
Javascript :: Assume that x is a char variable has been declared and already given a value. Write an expression whose value is true if and only if x is a upper-case letter. 
Javascript :: sequelize findall return 
Javascript :: objeto con método javascript 
Javascript :: Highest Scoring Word 
Javascript :: javascript conditional 
Javascript :: json validator 
Javascript :: JSON requests using API in Javascript 
Javascript :: slice() in javascript 
Javascript :: nodejs get file stats 
Javascript :: paginacion javascript 
Javascript :: deserialize json to c# object 
Javascript :: change bg-color all class 
Javascript :: javascript match 
Javascript :: display a div only seconds js 
Javascript :: javascript redirect to file 
Javascript :: install react hotjar 
Javascript :: deno vs node 
Javascript :: javascript substr 
Javascript :: jquery find attribute from siblings 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =