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

1 line
1.4 KiB
JSON

{"name":"not","type":"selector","title":":not() Selector","deprecated":null,"removed":null,"desc":"Selects all elements that do not match the given selector.","categories":["selectors/basic-filter-selectors","version/1.0"],"entries":[{"return":"","signatures":{"added":"1.0","argument":{"desc":"A selector with which to filter by.","name":"selector","type":"Selector"}},"examples":{"desc":"Finds all inputs that are not checked and highlights the next sibling span. Notice there is no change when clicking the checkboxes since no click events have been linked.","code":"\n$( \"input:not(:checked) + span\" ).css( \"background-color\", \"yellow\" );\n$( \"input\").attr( \"disabled\", \"disabled\" );\n","html":"\n<div>\n <input type=\"checkbox\" name=\"a\">\n <span>Mary</span>\n</div>\n<div>\n <input type=\"checkbox\" name=\"b\">\n <span>lcm</span>\n</div>\n<div>\n <input type=\"checkbox\" name=\"c\" checked=\"checked\">\n <span>Peter</span>\n</div>\n"},"longdesc":"\n <p>All selectors are accepted inside <code>:not()</code>, for example: <code>:not(div a)</code> and <code>:not(div,a)</code>.</p>\n <h3>Additional Notes</h3>\n <p>The <code><a href=\"/not/\">.not()</a></code> method will end up providing you with more readable selections than pushing complex selectors or variables into a <code>:not()</code> selector filter. In most cases, it is a better choice.</p>\n "}],"slug":"not-selector"}