I have a bunch of elements that look like this:
html php
These solutions still returned an empty alert for me. For me, following worked when I handled the event object passed to the hover function:
$(".input-box").hover(function(eventObj) { alert(eventObj.target.id); });
Source of this solution