1 line
1.3 KiB
JSON
1 line
1.3 KiB
JSON
{"name":"input","type":"selector","title":":input Selector","deprecated":null,"removed":null,"desc":"Selects all input, textarea, select and button elements.","categories":["selectors/form-selectors","selectors/jquery-selector-extensions","version/1.0"],"entries":[{"return":"","signatures":{"added":"1.0"},"examples":{"desc":"Finds all input elements.","code":"\nvar allInputs = $( \":input\" );\nvar formChildren = $( \"form > *\" );\n$( \"#messages\" ).text( \"Found \" + allInputs.length + \" inputs and the form has \" +\n formChildren.length + \" children.\" );\n\n$( \"form\" ).submit(function( event ) {\n event.preventDefault();\n});\n","css":"\n textarea {\n height: 25px;\n }\n ","html":"\n<form>\n <input type=\"button\" value=\"Input Button\">\n <input type=\"checkbox\">\n <input type=\"file\">\n <input type=\"hidden\">\n <input type=\"image\">\n <input type=\"password\">\n <input type=\"radio\">\n <input type=\"reset\">\n <input type=\"submit\">\n <input type=\"text\">\n <select>\n <option>Option</option>\n </select>\n <textarea></textarea>\n <button>Button</button>\n</form>\n<div id=\"messages\"></div>\n"},"longdesc":"\n <p>The <code>:input</code> selector basically selects all form controls.</p>\n "}],"slug":"input-selector"} |