I have the following HTML:
<div id="panel">
<div class="listing" id="ref_1">...</div>
<div class="listing" id="ref_2">...</div>
<div class="listing" id="ref_3">...</div>
<div class="listing" id="ref_4">...</div>
</div>
What I should like to do is, when someone hovers over a div.listing
, to alert()
to the screen the id
name.
Meaning, if a person hovers over with their mouse the id="ref_3"
, to alert("ref_3")
;
Question: How do I do this with JQuery/Javascript?
UPDATE:
Linked below is the live site. As you'll see, none of the answers below work. (Line 340)
Any recommendation?