Almost.
The basic syntax looks like this:
Code:
$('#tag-hover').mouseenter(mouseInFunction).mouseleave(mouseOutFunction);
And your code specifically would look like this then:
Code:
$('#tag-hover')
.mouseenter(
function(){
$('div.tag-font').stop(true, true).fadeOut(100, function(){
$('div.tag-image').stop(true, true).fadeIn(400);
});
}
)
.mouseleave(
function() {
$('div.tag-image').fadeOut(400, function(){
$('div.tag-font').fadeIn(100);
});
}
);
This is a very verbose way of writing it, it could as well look like this:
Code:
$('#tag-hover')
.mouseenter(function(){
$('div.tag-font').stop(true, true).fadeOut(100, function(){
$('div.tag-image').stop(true, true).fadeIn(400);
});
})
.mouseleave(function() {
$('div.tag-image').fadeOut(400, function(){
$('div.tag-font').fadeIn(100);
});
});