toggle?

toggle?

I'm trying to use toggle but when i go live the "div" I'm using to toggle fades out i think the code is correct what could be causing this. thanks
<script>
$(document).ready(function() {
$('.answer').hide();
$('.main h2').toggle(
    function(){
    $(this).next('.answer').fadeIn();
    $(this).addClass('close');
    },
    function() {
    $(this).next('.answer').fadeOut();
    $(this).removeClass('close');   
    }
    );//end of toggle()
}); // end ready
</script>