Duplicate: How would I implement StackOverflow's hovering dialogs?
I'm trying to create an error message, that is being displayed, so far here's a crude attempt, the message displays fine, however the click doesn't work..
function message(somemessage){
$(document).ready(function(){
$('<div class="error">' + somemessage+ '</div>')
.insertAfter( $('#ErrorMessage') ).fadeIn('slow').animate({opacity: 1.0}, 5000).click(function(){$(this).remove});
});
}