1 line
1.2 KiB
JSON
1 line
1.2 KiB
JSON
{"name":"attributeContainsPrefix","type":"selector","title":"Attribute Contains Prefix Selector [name|=\"value\"]","deprecated":null,"removed":null,"desc":"Selects elements that have the specified attribute with a value either equal to a given string or starting with that string followed by a hyphen (-).","categories":["selectors/attribute-selectors","version/1.0"],"entries":[{"return":"","signatures":{"added":"1.0","argument":[{"desc":"An attribute name.","name":"attribute","type":"String"},{"desc":"An attribute value. Can be either an unquoted single word or a quoted string.","name":"value","type":"String"}]},"examples":{"desc":"Finds all links with an hreflang attribute that is english.","code":"\n$( \"a[hreflang|='en']\" ).css( \"border\", \"3px dotted green\" );\n","html":"\n<a href=\"example.html\" hreflang=\"en\">Some text</a>\n<a href=\"example.html\" hreflang=\"en-UK\">Some other text</a>\n<a href=\"example.html\" hreflang=\"english\">will not be outlined</a>\n","css":"\n a {\n display: inline-block;\n }\n"},"longdesc":"\n <p>This selector was introduced into the CSS specification to handle language attributes.</p>\n "}],"slug":"attribute-contains-prefix-selector"} |