I have ids on page like:
<div id="1"><div id="inner-1" style="display:none;"></div></div>
<div id="2"><div id="inner-2" style="display:none;"></div></div>
<div id="3"><div id="inner-3" style="display:none;"></div></div>
Then, i have js to toggle visibility on hover parent id:
var toggleAuthor = function(id) {
jQuery('#inner-'+id).fadeIn();
};
var toggleAuthorOff = function(id) {
jQuery('#inner-'+id).delay(1000).fadeOut();
};
So the problem is how to send hovering id there, i think i must assigh hovering id to var and send it, something like that:
var aid = 38;
jQuery(aid).hover(function() {
toggleAuthor(aid);
}, function() {
toggleAuthorOff(aid);
});
But how to get only hovering id?
Thanks in advance.