[jQuery] Hover with a fade question (n00b)

[jQuery] Hover with a fade question (n00b)


Hi, I'm new to this group and to jQuery and javascript in general. I
would like to learn how to use hover with a fade. I can do each
separately but am having a hard time chaining them. Here's my best
attempts at a simple hover button with a fadeIn and FadeOut:
$(document).ready(function() {
    $('.button').hover(function() {
$(this).fadeIn(1000,$('.button').addClass('hover'));
}, function() {
$(this).fadeOut(1000,$('.button').removeClass('hover'));
});
});
That didn't work. Nor did this:
$(document).ready(function() {
    $('.button').hover(function() {
$(this).addClass('hover').fadeIn(1000);
}, function() {
$(this).removeClass('hover'.fadeOut(1000));
});
});
If anybody can help me out I'd be stoked. I've spent too much time on
this seemingly simple effect. Thanks.