title: extending jquery with a generic function
body: <p>I am writing the a generic function for my website using jquery which would be used over the entire site for displaying a success/error message. I decided to make it a plugin.</p>
  
  <p>A simple form of the plugin is given below:</p>
  
  <pre><code>; (function ($) {
          jQuery.FlashMessage=function(msg){
              alert(msg);
          }
  
  })(jQuery);
  </code></pre>
  
  <p>I wanted to know whether it is a good practice to define plugins in the jquery namespace or should it defined under $.fn.XXXX ..or am i overthinking and it doesn't matter it at all.</p>