title: How to close div clicking outside of it
body: <p>Now I am closing the alert box when I clicked on the 'x' but I want to close the alertbox when I click outside of it.</p>
  
  <p>Please see my code here :<a href="http://jsfiddle.net/Ur5Xn/" rel="nofollow">http://jsfiddle.net/Ur5Xn/</a> </p>
  
  <p>How to close alertbox clicking outside of it?</p>
  
  <p><strong>The jQuery:</strong></p>
  
  <pre><code>$(document).ready(function(){
      function showAlertBox(){
       $("#alert").css("display","inherit");
       $("#content").addClass("back");
      }
      function removeAlertBox(){
          $("#alert").css("display","none");
           $("#content").removeClass("back");        
      }
  
      $("#alertClose").click(function(){
         removeAlertBox(); 
      });
      $("#alertShow").click(function(){
         showAlertBox(); 
      });
  });
  </code></pre>