control-freak-ide/Control-Freak-Documentation/jQuery/docs/entries/password-selector.json
plastic-hub-dev-node-saturn 538369cff7 latest
2021-05-12 18:35:18 +02:00

1 line
1.6 KiB
JSON

{"name":"password","type":"selector","title":":password Selector","deprecated":null,"removed":null,"desc":"Selects all elements of type password.","categories":["selectors/form-selectors","selectors/jquery-selector-extensions","version/1.0"],"entries":[{"return":"","signatures":{"added":"1.0"},"examples":{"desc":"Finds all password inputs.","code":"\nvar input = $( \"input:password\" ).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\n// Prevent form submission\n$( \"form\" ).submit(function() {\n return false;\n});\n","css":"\n textarea {\n height: 45px;\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></div>\n"},"longdesc":"\n <p><code>$( \":password\" )</code> is equivalent to <code>$( \"[type=password]\" )</code>. 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 <code>$( \":password\" )</code> is equivalent to <code>$( \"*:password\" )</code>, so <code>$( \"input:password\" )</code> should be used instead. </p>\n "}],"slug":"password-selector"}