title: How to run jQuery code in the JavaScript onclick function?
body: <p>Clicking on the "close" <code>anchor</code> does not close the notification.</p>
  
  <p>Below is my code: </p>
  
  <pre><code>function show_notification_on_top(message, type) {  
  
      content =   "&lt;a class='notify-close' onclick='$(\"#notification-box\").fadeOut(\"slow\");' href='#'&gt;close&lt;/a&gt;"+ 
                  "&lt;p&gt;"+message+"&lt;/p&gt;";                   
  
      $("#notification-box").fadeIn('slow', function() {
              $("#notification-box").delay(60000).fadeOut('slow');
          });
  
      $("#notification-box").html( content ); 
  }
  </code></pre>