On 9/8/06, John Resig <[EMAIL PROTECTED]> wrote:
> > AFAIK thats right. It's a design decision not to extend existing
> > classes, as that can break code that iterates over properties of
> > objects. But I'm not sure if this applies to String, too. Eg. extending
> > String with a trim() method seems to make more sense then $.trim()...
>
> That's correct. That's something that will probably be with jQuery
> someday, as a plugin - but probably not included in core directly. If
> anyone wants to step up and build a suite of useful functions, you're
> welcome to it!
>
> --John
>
Thanks I see. I'm newbie to jQuery, I have some interestring in adding
some extension to jQuery. But for plugin, I understand a jQuery object
will encapuslate one or more dom elements(I'm right?), and plugin will
also process these objects. But for string, array, etc, maybe not the
dom element, so how to understand:

$(['aaa', 'bbb']) or $('aaa')

So direct plugin maybe not suitable, but how about:

$.list(['aaa', 'bbb']) or $.str('aaa')

I borrow 'list' and 'str' from python(I'm a big python fan). If these
could be a reasonable syntax format, I'll try to make such extension.
But because I'm a newbie to jQuery, there are should be many problems
in front of the way I think.

-- 
I like python!
My Blog: http://www.donews.net/limodou
UliPad Site: http://wiki.woodpecker.org.cn/moin/UliPad
UliPad Maillist: http://groups.google.com/group/ulipad

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to