I am attempting to use Jquery to append a footer div into another div and have the newly appended footer div display on hover and slowly fade/hide afterwards. This is the code I have come up with so far:
<script type="text/javascript">
$('.xg_widget_main .module_forum .vcard').hover(function(){
$(this).append($('.module_forum .xg_module_foot').show('show'));
});
</script>
The obstacle I am facing with this code is that the appended div will not obey the .show('show') function and after the mouse is removed from the hover area the appended div does not fade out slowly, but instantly. Can someon advise what I am missing here?
Ok, i got the code to work using:
<script type="text/javascript">
$('.xg_widget_main .module_forum .vcard').hover(function(){
$('.module_forum .xg_module_foot').hide().appendTo(this).show('slow');
});
</script>
But, the appended div does not remove/hide when the mouse is moved away from ('.xg_widget_main .module_forum .vcard'). Can someone suggest how this can be done?