[jQuery] Plugin's method called chained with selector or not?

[jQuery] Plugin's method called chained with selector or not?

<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Hi everyone,<DIV><BR class="khtml-block-placeholder"></DIV><DIV>I am writing little plugins for helping me in my developments. Everything's ok, and easy to do, but now I'm face to face with a little problem.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I've a plugin's method like this:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>[CODE]</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>jQuery.fn.methodName = function(options) {</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>// Code</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>}</DIV><DIV>[END CODE]</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>The problem is that I want to know when I call the function this way:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>[CODE]</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>$('elemento.class').methodName();</DIV><DIV>[END CODE]</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>And when I call it this other way:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>[CODE]</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>$.fn.methodName();</DIV><DIV>[END CODE]</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I need this in order to do the "this.each" thing inside the plugin's method.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Hope everything is well explained, and sorry about my poor english.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Thanks in advance.</DIV><DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV>--</DIV><DIV>Juan G. Hurtado</DIV><DIV><A href="mailto:juan.g.hurtado@gmail.com"> juan.g.hurtado@gmail.com</A></DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></DIV></BODY></HTML>