check if textbox is focused jquery
//test if element has focus in jQuery
if ($("#myElementID").is(":focus")) {
//I have the focus
}
//test if element has focus in plain Javascript
var myElement = document.getElementById('myID');
if(myElement === document.activeElement){
//myElement Has Focus
}
var myElement = document.getElementById('myID');
if(myElement === document.activeElement){
//myElement Has Focus
}
Also in JavaScript:
- how to get all json object with jsonpath
- javascript get last n characters of string
- generate random alphanumeric string javascript
- play iframe video onclick a link javascript
- Update matched key values in two JavaScript objects
- rtl support react native
- vue props with type object/array must use a factory function to return the default value.
- comments in js
- hexstring to rgb array js
- javascript pass parameter to event listener
- javascript regex reference
- get gcf javascriot
- pm2 group console messages
- delete all the rows of table javascript
- use effect like component did mount
- remove duplicate objects from array javascript
- how to host react app on heroku
- sprintf js
- jquery detect shift tab
- how to delay redirect in javascript
- change color of strike through line of text in react native
- javascript remove last element from array
- javascript canvas
- angular pipe multiple arguments