1 line
784 B
JSON
1 line
784 B
JSON
{"name":"root","type":"selector","title":":root Selector","deprecated":null,"removed":null,"desc":"Selects the element that is the root of the document.","categories":["selectors/basic-filter-selectors","version/1.9"],"entries":[{"return":"","signatures":{"added":"1.9"},"examples":{"desc":"Display the tag name of the root element.","code":"\n$( \"<b></b>\" ).html( $( \":root\" )[ 0 ].nodeName ).appendTo( \"#log\" );\n","css":"\n span.fot {\n color: red;\n font-size: 120%;\n font-style: italic;\n }\n","html":"\n<div id=\"log\">The root of this document is: </div>\n"},"longdesc":"\n <p>In HTML, the root of the document, and thus the element that <code>$(\":root\")</code> selects, is always the <code><html></code> element.</p>\n "}],"slug":"root-selector"} |