Re: [jQuery] Enabling wildcards in .className selector

2007-02-13 Thread George Adamson
Just discovered that simple wildcards can be used *without* modifying jquery code (phew), by using \\S* in the selector syntax... Can be done like this: $(INPUT.myClass\\S*) will match .myClass1 and .myClassHello etc. This only works where selector searches in the jquery code rely on a regex,

[jQuery] Enabling wildcards in .className selector

2007-02-13 Thread George Adamson
I recently had a need for a simple wildcard in the class selector syntax. eg: $(INPUT.myClass*) would match .myClass1 and .myClassHello etc. As an experiment to make this work I made a small change to JQuery's code but that is decidedly poor practice! I'd like to apply the change as a small

Re: [jQuery] Enabling wildcards in .className selector

2007-02-13 Thread Klaus Hartl
George Adamson schrieb: Just discovered that simple wildcards can be used *without* modifying jquery code (phew), by using \\S* in the selector syntax... Can be done like this: $(INPUT.myClass\\S*) will match .myClass1 and .myClassHello etc. This only works where selector searches in

Re: [jQuery] Enabling wildcards in .className selector

2007-02-13 Thread George Adamson
Oh silly me, thanks Klaus, excellent suggestion. That should cover most situations. Much simpler than fiddling with regex, and easier for others to follow! Cheers, George Klaus Hartl wrote: George Adamson schrieb: Just discovered that simple wildcards can be used *without* modifying