> If you say jQuery doesn't support the OR selector '|',  then I'm
> confused. I have a form with one SELECT element and several INPUTs.
> Check out the following results from Firebug:
>
> >>> $('INPUT', $('#myform')).length
> 6
> >>> $('INPUT|SELECT', $('#myform')).length
> 7
>
> That's what I expected as a result.. can you explain?

Oh... well, I'll be:
if ( !t.indexOf(",") || !t.indexOf("|") ) {

Apparently I treat a | just like a , - which is odd and incorrect. I
must've added that a long time ago and forgot about it. The result of
each operator should be something like:

For ',' (AND): input, input, input, select
For '|' (OR): input, input, select, input

The problem is that doing an 'OR' search with the DOM is "hard"
(certainly not as easy as doing an AND).  So, for now, I'd recommend
migrating your '|' usage to ',' - as it probably won't work as you'd
expect it to, for forever.

--John

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

Reply via email to