The name property is associated with every (or nearly every? are
there exceptions?) DOM element. In my code I make extensive use of the
name property, and it has been extremely useful to refer to specific elements
directly by their name property rather than id or class.
        When used repeatedly, it is much cleaner (and I suspect faster, though
I haven't benchmarked it) than the equivalent '[EMAIL PROTECTED]' selector.

        I would submit this as a plugin, but I don't believe this fundamental
of a change is possible via a plugin.

        I've used the '%' character for lack of something more appropriate,
though this is somewhat arbitrary.

> diff jquery-latest.js jquery-local.js
742a743
>               "%": "a.getAttribute('name')==m[2]",
817c818
<               /^([:.#]*)([a-z0-9_*-]*)/i
---
>               /^([:.#%]*)([a-z0-9_*-]*)/i
1035c1036
<               while ( t && /^[a-z[({<*:.#]/i.test(t) ) {
---
>               while ( t && /^[a-z[({<*:.#%]/i.test(t) ) {

        I plan on presenting a particular coding pattern which uses this
in a separate email, but I wanted to propose this on its own merits separately
so as to avoid the further debate regarding coding style.

        Comments?

        Thanks,

        Austin

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

Reply via email to