<section class="sectionQuemSomos">
<a class="iconQuemSomos" id="QuemSomos">
<img class="img-fluid" style="height: 80px" src="assets/img/icos/Icone_Quemsomos.png">
</a>
</section>
and the following JS code:
$(document).ready(function() {
"use strict";
var quemSomos = document.getElementById("QuemSomos");
$(document).addEventListener('focus', function(){
if (quemSomos === document.activeElement){
alert("efds");
}
});
});
As simple as it sounds, I can not get this if statement to return true and get into your code block. I click on the tag to give it focus but no alert is displayed, so I know that this check is not working.
I'm trying to implement this eventListener so that this check can occur after the document is ready.
Thank you for your attention!