title: Creating and calling jQuery Plugin
body: <p>I have come across plenty of jQuery Plugin Patters (boilerplates) on this website:</p>
  
  <p><a href="https://github.com/jquery-boilerplate/patterns/tree/master/patterns" rel="nofollow">Github jQuery Plugin Patterns</a></p>
  
  <p>Nonetheless I was looking even further but I was unable to find anything that would work as I expected. My knowledge for jQuery is quite low, yet I thought I will earn the best if I start creating some small plugins for self... Just for fun and to learn more.</p>
  
  <p>So for example I like this patter:
  <a href="https://raw.github.com/jquery-boilerplate/patterns/master/patterns/jquery.best.options.plugin-boilerplate.js" rel="nofollow">Best Options Pattern</a></p>
  
  <p>It looks clean and quite nice to me. However I am not sure why I cannot call the plugin like all other plugins that we can find around... For example backstretch JS or Make it Retina... It is called like this.</p>
  
  <pre><code>$.backstretch('path to image');
  
  $.makeItRetina();
  </code></pre>
  
  <p>So I have tried everything that I thought it might work and the only way to call the plugin from that pattern above is following:</p>
  
  <pre><code>$(document).pluginName();
  </code></pre>
  
  <p>And I don't want to have it like that... It looks better and simplified if it's just </p>
  
  <pre><code>$.pluginName();
  </code></pre>
  
  <p>Anyone to show me the path / way how to do this ? I am really confused.</p>