{"name":"file","type":"selector","title":":file Selector","deprecated":null,"removed":null,"desc":"Selects all elements of type file.","categories":["selectors/form-selectors","selectors/jquery-selector-extensions","version/1.0"],"entries":[{"return":"","signatures":{"added":"1.0"},"examples":{"desc":"Finds all file inputs.","code":"\nvar input = $( \"input:file\" ).css({\n background: \"yellow\",\n border: \"3px red solid\"\n});\n$( \"div\" )\n .text( \"For this type jQuery found \" + input.length + \".\" )\n .css( \"color\", \"red\" );\n$( \"form\" ).submit(function( event ) {\n event.preventDefault();\n});\n","css":"\n textarea {\n height: 45px;\n }\n","html":"\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n"},"longdesc":"\n

:file is equivalent to [type=\"file\"]. 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 $( \":file\" ) is equivalent to $(\"*:file\" ), so $( \"input:file\" ) should be used instead.

\n "}],"slug":"file-selector"}