Duplicate: qaru.site/questions/56142 / ...
I am trying to create an error message that is displayed, there is still a rough attempt, the message is displayed normally, however the click does not 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});
});
}
ra170 source
share