Need some help - Adding fade effect!

Need some help - Adding fade effect!

Hi guys! 
As the topic says, I need some help to add a fade effect. Right now I only have a Hide/Show - kinda effect.
The script looks like this: 

// JavaScript Document


window.onload = function() {

/*document.getElementById("container").style.background = "blue";*/

var hiddenstuff = document.getElementById("hiddenstuff");

document.getElementById("displaybutton").onclick = function(){

if (hiddenstuff.style.display == "none") {

hiddenstuff.style.display = "block";

}

else {

hiddenstuff.style.display = "none";

}

}

/*document.getElementById("container").onclick = function() {

this.style.border = "10px solid #fff";

}*/

}


A friend of mine helped me a bit and gave me this, but I don't know how to apply it:



$(function() {

$('#displaybutton').toggle


(function() {

$('#hiddenstuff').fadeIn(400);

}, function() {

$('#hiddenstuff').fadeOut(400);

});

});


Your help is really appreciated! 

- CptnCake