how do i tell if an element has focus code example
Example: javascript test if element has focus
var myElement = document.getElementById('myID');
if(myElement === document.activeElement){
//myElement Has Focus
}
var myElement = document.getElementById('myID');
if(myElement === document.activeElement){
//myElement Has Focus
}