Hide the Jquery notification bar
<p>I am using Jquery to display notification at the top of my webpage. I am using the following function to display the notification bar - </p>

<pre><code>function myBar(message) {
    $("&lt;div /&gt;", { class: 'mybar', text: message, id: 'mymsg' }).hide().prependTo("body")
      .slideDown('slow');
}
</code></pre>

<p>And in <code>$(document).ready(function(){</code> I am calling the <code>myBar("my message");</code>, with appropriate css. It is displaying the bar as required. </p>

<p>Now I want to hide the bar when one clicks on the bar. For that I am trying this </p>

<pre><code>$("#mymsg").click(function() {
     $(this).remove();
})
</code></pre>

<p>But this is not working as such. Any suggestions on what might be wrong?</p>
