1 line
1.0 KiB
JSON
1 line
1.0 KiB
JSON
{"name":"contains","type":"selector","title":":contains() Selector","deprecated":null,"removed":null,"desc":"Select all elements that contain the specified text.","categories":["selectors/content-filter-selector","version/1.1.4"],"entries":[{"return":"","signatures":{"added":"1.1.4","argument":{"desc":"A string of text to look for. It's case sensitive.","name":"text","type":"String"}},"examples":{"desc":"Finds all divs containing \"John\" and underlines them.","code":"\n$( \"div:contains('John')\" ).css( \"text-decoration\", \"underline\" );\n","html":"\n<div>John Resig</div>\n<div>George Martin</div>\n<div>Malcom John Sinclair</div>\n<div>J. Ohn</div>\n"},"longdesc":"\n <p>The matching text can appear directly within the selected element, in any of that element's descendants, or a combination thereof. As with attribute value selectors, text inside the parentheses of <code>:contains()</code> can be written as a bare word or surrounded by quotation marks. The text must have matching case to be selected.</p>\n "}],"slug":"contains-selector"} |