I’m stuck

the script on page 183 is different then the script provided in source code. Its not working either. :s

this is from source code !
$(document).ready(function() {
$('.answer').hide();
$('.main h2').toggle(
function() {
$(this).next('.answer').slideDown();
$(this).addClass('close');
},
function() {
$(this).next('.answer').fadeOut();
$(this).removeClass('close');
}
); // end toggle
}); // end ready

$(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 toggle
}); // end ready

this is from the BOOK`s chapter 5 page #183. the One-Page Faq
Its not working either ... what i do now i am stuck please help
1 person has
this question
+1
Reply