jQuery and the this object
<p>jQuery is too overpowering :(</p>

<pre><code>String.prototype.trim = function () {
    return this.replace(/^(\s|&amp;nbsp;|\u00A0)+|(\s|&amp;nbsp;|\u00A0)+$/g, "");
}
</code></pre>

<p>when I try to add the above code, I get <em>"this.replace is not a function"</em>.</p>

<p>I realise that jQuery references itself as <code>this</code>, so how are you meant to reference <code>this</code>?</p>
