Could you please explain this sort of JavaScript syntax from Jquery for me?
<p>As an example, here is a screenshot from jQuery1.8.
<img src="http://i.stack.imgur.com/7BDkX.png" alt="enter image description here"></p>

<p>Why can I do something like this from the perspective of jQuery source code ?
Is <code>addClass</code> jquery's method? But what i saw was from <strong>jQuery.fn.extend</strong>.</p>

<pre><code>$("xid").addClass("xxx");
</code></pre>

<p>I am relatively new to JavaScript and wrote some pretty simple code like directly add a method in <strong>.html</strong>.</p>

<pre><code> &lt;html&gt;
    &lt;script&gt;
        function m() {
            alert("simple");
        }
    &lt;/script&gt;
 &lt;/html&gt;
</code></pre>

<p>I couldn't understand the complex syntax particularly in the JavaScript Framework like ExtJs,jQuery, although I have searched a number of relative documents about this, but I still don't have a clear understanding. Maybe I need to spend time seriously reading a special JavaScript book, but this moment I want to know the answer.</p>

<p>Thanks.</p>
