:text selector

:text Selector

text selector

Description: Selects all input elements of type text.

  • version added: 1.0jQuery( ":text" )

$( ":text" ) allows us to select all <input type="text"> elements. As with other pseudo-class selectors (those that begin with a ":") it is recommended to precede it with a tag name or some other selector; otherwise, the universal selector ( "*" ) is implied. In other words, the bare $( ":text" ) is equivalent to $( "*:text" ), so $( "input:text