I've got this simple function which displays a message to the user. If I add the timeout parameter it will slide back up automatically if not the user has to click it to get rid. But the timeout bit isn't working.
function feedback(text, timeout){
$('#feedback').text(text).slideDown('fast');
$('#feedback').click(function(){
$(this).slideUp();
});
if(timeout){
setTimeout(function(){
$('#feedback').slideup();
}, timeout);
}
}