[jQuery] How to select :inp...@type=text] OR :inp...@type=password]

2009-04-09 Thread Nick Boutelier

How do you use an OR statement in a selector function? For example...

$(':inp...@type=text,password]').each(function(){
   // do something to a text or password input
});


[jQuery] Re: How to select :inp...@type=text] OR :inp...@type=password]

2009-04-09 Thread Nick Boutelier

Thanks guys. Exactly what I needed.

On Apr 9, 4:46 am, MorningZ morni...@gmail.com wrote:
 First off, lose the @ if you are planning on using version 1.3.1 or
 higher of the jQuery library

 second, the docs are your friendhttp://docs.jquery.com/Selectors(see the last 
 item in the basics
 section on the top)

 $(:text, :password)

 On Apr 9, 1:53 am, Nick Boutelier nboutel...@gmail.com wrote:



  How do you use an OR statement in a selector function? For example...

  $(':inp...@type=text,password]').each(function(){
     // do something to a text or password input

  });- Hide quoted text -

 - Show quoted text -