Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
27 lines (26 sloc) 920 Bytes
<?xml version="1.0"?>
<entry type="selector" name="header" return="">
<title>:header Selector</title>
<desc>Selects all elements that are headers, like h1, h2, h3 and so on.</desc>
<note id="jquery-selector-extension" type="additional" data-selector=":header"/>
<desc>Adds a background and text color to all the headers on the page.</desc>
<code><![CDATA[$(":header").css({ background:'#CCC', color:'blue' });]]></code>
<html><![CDATA[<h1>Header 1</h1>
<p>Contents 1</p>
<h2>Header 2</h2>
<p>Contents 2</p>]]></html>
body { font-size: 10px; font-family: Arial; }
h1, h2 { margin: 3px 0; }
<category slug="selectors/basic-filter-selectors"/>
<category slug="selectors/jquery-selector-extensions"/>
<category slug="version/1.2"/>
Jump to Line
Something went wrong with that request. Please try again.