Here is my HTML:
<div id="doc1" class="document-container-title">
<h3>Doc 1</h3>
</div>
<div id="doc2" class="document-container-title">
<h3>Doc 2</h3>
</div>
<div id="doc3" class="document-container-title">
<h3>Doc 3</h3>
</div>
As you can see, each div
has a class of 'document-container-title'. I want to add some JavaScript to detect if any one of these divs
were hovered over, and then I want to find out which specific div was hovered over. Specifically, I want to be able to detect whether a div with the class of document-container-title
was hovered over. If so, then I want to get the id of the exact div that was hovered over.
I am only one month into JavaScript so a helpful explanation wouldn't hurt.
Thanks.
P.S. I don't mind using jQuery.