私は以下を使用します、
<div id='message' style="display: none;">
<span></span>
<a href="#" class="close-notify">X</a>
</div>
今、私はdiv内のスパンを見つけて、それにテキストを割り当てたいと思います...
function Errormessage(txt) {
$("#message").fadeIn("slow");
// find the span inside the div and assign a text
$("#message a.close-notify").click(function() {
$("#message").fadeOut("slow");
});
}