I am trying to get proper selection in the second half of the function, the callback part to reverse the fadeIn after hover event. The selector doesn’t seem to work in this second part of the function.
$(document).ready(function(){
$(".comment").corner();
$(".hov").hover(function(){
var idd = $(this).attr("name");
$("#" + idd).appendTo(this).fadeIn();
}, function(){
$("#" + idd).fadeOut();
});
});
That is because
iddis defined inside first hover first callback. It will not be accessible inside other callback. Try this