jquery plugin syntax
<p>I am trying to create a jquery plugin, and I want have the following options:</p>

<ol>
<li><p><code>$.plugin_name(variable)</code></p></li>
<li><p><code>$(selector).plugin_name(variable)</code></p></li>
</ol>

<p>The first case the plugin would not need to be applied to an element ( it could create one for example) the second case the same plugin will do whatever it does on the element/s selected</p>

<p>My question is: How do I specify inside the plugin this:</p>

<pre><code>if (selector is not given) {
  create an element
} else {
  ( for example) insert variable in elements matching the selector
}
</code></pre>
