Maybe: if($('#birth_date').attr('type') == 'text') {
Or: if($('#birth_date')[0].type == 'text') { Or: if($('#birth_date').is(':text')) { Or if you just want to do something to birth_date if it is a certain type, then just: $('#birth_date:text').doSomething(); See here: http://docs.jquery.com/DOM/Traversing/Selectors#Form_Selectors And here: http://docs.jquery.com/DOM/Attributes --Erik On 9/15/07, erveloso <[EMAIL PROTECTED]> wrote: > > > Hi, > > How do I detect an input type? > > Something like: > > if ($('#birth_date').type() == 'text'){ > // do something > } > > Thanks, > > Emilio > >