Accordion: Removed requirement for headers contain a child (and removed associated ui-accordion-heading class).

This commit is contained in:
Scott González 2012-02-26 21:37:44 -05:00
parent 4da7ec37ac
commit 02855292f2
13 changed files with 47 additions and 65 deletions

View File

@ -22,15 +22,15 @@
<div class="demo"> <div class="demo">
<div id="accordion"> <div id="accordion">
<h3><a href="#">Section 1</a></h3> <h3>Section 1</h3>
<div> <div>
<p>Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.</p> <p>Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.</p>
</div> </div>
<h3><a href="#">Section 2</a></h3> <h3>Section 2</h3>
<div> <div>
<p>Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna. </p> <p>Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna. </p>
</div> </div>
<h3><a href="#">Section 3</a></h3> <h3>Section 3</h3>
<div> <div>
<p>Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. </p> <p>Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. </p>
<ul> <ul>
@ -39,7 +39,7 @@
<li>List item three</li> <li>List item three</li>
</ul> </ul>
</div> </div>
<h3><a href="#">Section 4</a></h3> <h3>Section 4</h3>
<div> <div>
<p>Cras dictum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia mauris vel est. </p><p>Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. </p> <p>Cras dictum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia mauris vel est. </p><p>Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. </p>
</div> </div>

View File

@ -32,15 +32,15 @@
<div class="demo"> <div class="demo">
<div id="accordion"> <div id="accordion">
<h3><a href="#">Section 1</a></h3> <h3>Section 1</h3>
<div> <div>
<p>Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.</p> <p>Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.</p>
</div> </div>
<h3><a href="#">Section 2</a></h3> <h3>Section 2</h3>
<div> <div>
<p>Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna. </p> <p>Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna. </p>
</div> </div>
<h3><a href="#">Section 3</a></h3> <h3>Section 3</h3>
<div> <div>
<p>Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. </p> <p>Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. </p>
<ul> <ul>
@ -49,7 +49,7 @@
<li>List item three</li> <li>List item three</li>
</ul> </ul>
</div> </div>
<h3><a href="#">Section 4</a></h3> <h3>Section 4</h3>
<div> <div>
<p>Cras dictum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia mauris vel est. </p><p>Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. </p> <p>Cras dictum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia mauris vel est. </p><p>Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. </p>
</div> </div>

View File

@ -20,7 +20,7 @@
<div class="demo"> <div class="demo">
<div id="accordion"> <div id="accordion">
<h3><a href="#">Section 1</a></h3> <h3>Section 1</h3>
<div> <div>
<p> <p>
Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer
@ -29,7 +29,7 @@
odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate. odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.
</p> </p>
</div> </div>
<h3><a href="#">Section 2</a></h3> <h3>Section 2</h3>
<div> <div>
<p> <p>
Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet
@ -38,7 +38,7 @@
suscipit faucibus urna. suscipit faucibus urna.
</p> </p>
</div> </div>
<h3><a href="#">Section 3</a></h3> <h3>Section 3</h3>
<div> <div>
<p> <p>
Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis.
@ -52,7 +52,7 @@
<li>List item three</li> <li>List item three</li>
</ul> </ul>
</div> </div>
<h3><a href="#">Section 4</a></h3> <h3>Section 4</h3>
<div> <div>
<p> <p>
Cras dictum. Pellentesque habitant morbi tristique senectus et netus Cras dictum. Pellentesque habitant morbi tristique senectus et netus

View File

@ -37,15 +37,15 @@
<div id="accordionResizer" style="padding:10px; width:350px; height:220px;" class="ui-widget-content"> <div id="accordionResizer" style="padding:10px; width:350px; height:220px;" class="ui-widget-content">
<div id="accordion"> <div id="accordion">
<h3><a href="#">Section 1</a></h3> <h3>Section 1</h3>
<div> <div>
<p>Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.</p> <p>Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.</p>
</div> </div>
<h3><a href="#">Section 2</a></h3> <h3>Section 2</h3>
<div> <div>
<p>Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna. </p> <p>Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna. </p>
</div> </div>
<h3><a href="#">Section 3</a></h3> <h3>Section 3</h3>
<div> <div>
<p>Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. </p> <p>Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. </p>
<ul> <ul>
@ -54,7 +54,7 @@
<li>List item three</li> <li>List item three</li>
</ul> </ul>
</div> </div>
<h3><a href="#">Section 4</a></h3> <h3>Section 4</h3>
<div> <div>
<p>Cras dictum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia mauris vel est. </p><p>Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. </p> <p>Cras dictum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia mauris vel est. </p><p>Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. </p>
</div> </div>

View File

@ -73,7 +73,7 @@
<div class="demo"> <div class="demo">
<div id="accordion"> <div id="accordion">
<h3><a href="#">Section 1</a></h3> <h3>Section 1</h3>
<div> <div>
<p> <p>
Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer
@ -82,7 +82,7 @@
odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate. odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.
</p> </p>
</div> </div>
<h3><a href="#">Section 2</a></h3> <h3>Section 2</h3>
<div> <div>
<p> <p>
Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet
@ -91,7 +91,7 @@
suscipit faucibus urna. suscipit faucibus urna.
</p> </p>
</div> </div>
<h3><a href="#">Section 3</a></h3> <h3>Section 3</h3>
<div> <div>
<p> <p>
Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis.
@ -105,7 +105,7 @@
<li>List item three</li> <li>List item three</li>
</ul> </ul>
</div> </div>
<h3><a href="#">Section 4</a></h3> <h3>Section 4</h3>
<div> <div>
<p> <p>
Cras dictum. Pellentesque habitant morbi tristique senectus et netus Cras dictum. Pellentesque habitant morbi tristique senectus et netus

View File

@ -22,15 +22,15 @@
<div class="demo"> <div class="demo">
<div id="accordion"> <div id="accordion">
<h3><a href="#">Section 1</a></h3> <h3>Section 1</h3>
<div> <div>
<p>Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.</p> <p>Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.</p>
</div> </div>
<h3><a href="#">Section 2</a></h3> <h3>Section 2</h3>
<div> <div>
<p>Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna. </p> <p>Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna. </p>
</div> </div>
<h3><a href="#">Section 3</a></h3> <h3>Section 3</h3>
<div> <div>
<p>Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. </p> <p>Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. </p>
<ul> <ul>
@ -39,7 +39,7 @@
<li>List item three</li> <li>List item three</li>
</ul> </ul>
</div> </div>
<h3><a href="#">Section 4</a></h3> <h3>Section 4</h3>
<div> <div>
<p>Cras dictum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia mauris vel est. </p><p>Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. </p> <p>Cras dictum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia mauris vel est. </p><p>Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. </p>
</div> </div>

View File

@ -22,15 +22,15 @@
<div class="demo"> <div class="demo">
<div id="accordion"> <div id="accordion">
<h3><a href="#section1">Section 1</a></h3> <h3>Section 1</h3>
<div> <div>
<p>Mauris mauris ante, blandit et, ultrices a, susceros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.</p> <p>Mauris mauris ante, blandit et, ultrices a, susceros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.</p>
</div> </div>
<h3><a href="#section2">Section 2</a></h3> <h3>Section 2</h3>
<div> <div>
<p>Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna. </p> <p>Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna. </p>
</div> </div>
<h3><a href="#section3">Section 3</a></h3> <h3>Section 3</h3>
<div> <div>
<p>Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. </p> <p>Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. </p>
<ul> <ul>
@ -42,7 +42,6 @@
<li>List item</li> <li>List item</li>
<li>List item</li> <li>List item</li>
</ul> </ul>
<a href="#othercontent">Link to other content</a>
</div> </div>
</div> </div>

View File

@ -39,19 +39,19 @@
<div id="accordion"> <div id="accordion">
<div class="group"> <div class="group">
<h3><a href="#">Section 1</a></h3> <h3>Section 1</h3>
<div> <div>
<p>Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.</p> <p>Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.</p>
</div> </div>
</div> </div>
<div class="group"> <div class="group">
<h3><a href="#">Section 2</a></h3> <h3>Section 2</h3>
<div> <div>
<p>Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna. </p> <p>Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna. </p>
</div> </div>
</div> </div>
<div class="group"> <div class="group">
<h3><a href="#">Section 3</a></h3> <h3>Section 3</h3>
<div> <div>
<p>Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. </p> <p>Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. </p>
<ul> <ul>
@ -62,7 +62,7 @@
</div> </div>
</div> </div>
<div class="group"> <div class="group">
<h3><a href="#">Section 4</a></h3> <h3>Section 4</h3>
<div> <div>
<p>Cras dictum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia mauris vel est. </p><p>Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. </p> <p>Cras dictum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia mauris vel est. </p><p>Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. </p>
</div> </div>

View File

@ -51,7 +51,7 @@
<div id="qunit-fixture"> <div id="qunit-fixture">
<div id="list1" class="foo"> <div id="list1" class="foo">
<h3 class="bar"><a class="anchor">There is one obvious advantage:</a></h3> <h3 class="bar">There is one obvious advantage:</h3>
<div class="foo"> <div class="foo">
<p> <p>
You've seen it coming! You've seen it coming!
@ -61,7 +61,7 @@
Well, at least no free beer. Perhaps a bear, if you can afford it. Well, at least no free beer. Perhaps a bear, if you can afford it.
</p> </p>
</div> </div>
<h3 class="bar"><a class="anchor">Now that you've got...</a></h3> <h3 class="bar">Now that you've got...</h3>
<div class="foo"> <div class="foo">
<p> <p>
your bear, you have to admit it! your bear, you have to admit it!
@ -72,7 +72,7 @@
We could talk about renting one. We could talk about renting one.
</p> </p>
</div> </div>
<h3 class="bar"><a class="anchor">Rent one bear, ...</a></h3> <h3 class="bar">Rent one bear, ...</h3>
<div class="foo"> <div class="foo">
<p> <p>
get two for three beer. get two for three beer.
@ -120,19 +120,19 @@
<dl id="accordion-dl"> <dl id="accordion-dl">
<dt> <dt>
<a href="#">Accordion Header 1</a> Accordion Header 1
</dt> </dt>
<dd> <dd>
Accordion Content 1 Accordion Content 1
</dd> </dd>
<dt> <dt>
<a href="#">Accordion Header 2</a> Accordion Header 2
</dt> </dt>
<dd> <dd>
Accordion Content 2 Accordion Content 2
</dd> </dd>
<dt> <dt>
<a href="#">Accordion Header 3</a> Accordion Header 3
</dt> </dt>
<dd> <dd>
Accordion Content 3 Accordion Content 3

View File

@ -24,13 +24,6 @@ test( "handle click on header-descendant", function() {
accordion_state( element, 0, 1, 0 ); accordion_state( element, 0, 1, 0 );
}); });
test( "ui-accordion-heading class added to headers anchor", function() {
expect( 1 );
var element = $( "#list1" ).accordion();
var anchors = element.find( ".ui-accordion-heading" );
equal( anchors.length, 3 );
});
test( "accessibility", function () { test( "accessibility", function () {
expect( 13 ); expect( 13 );
var element = $( "#list1" ).accordion().accordion( "option", "active", 1 ); var element = $( "#list1" ).accordion().accordion( "option", "active", 1 );

View File

@ -49,7 +49,7 @@
<div id="qunit-fixture"> <div id="qunit-fixture">
<div id="list1" class="foo"> <div id="list1" class="foo">
<h3 class="bar"><a class="anchor">There is one obvious advantage:</a></h3> <h3 class="bar">There is one obvious advantage:</h3>
<div class="foo"> <div class="foo">
<p> <p>
You've seen it coming! You've seen it coming!
@ -59,7 +59,7 @@
Well, at least no free beer. Perhaps a bear, if you can afford it. Well, at least no free beer. Perhaps a bear, if you can afford it.
</p> </p>
</div> </div>
<h3 class="bar"><a class="anchor">Now that you've got...</a></h3> <h3 class="bar">Now that you've got...</h3>
<div class="foo"> <div class="foo">
<p> <p>
your bear, you have to admit it! your bear, you have to admit it!
@ -70,7 +70,7 @@
We could talk about renting one. We could talk about renting one.
</p> </p>
</div> </div>
<h3 class="bar"><a class="anchor">Rent one bear, ...</a></h3> <h3 class="bar">Rent one bear, ...</h3>
<div class="foo"> <div class="foo">
<p> <p>
get two for three beer. get two for three beer.
@ -118,19 +118,19 @@
<dl id="accordion-dl"> <dl id="accordion-dl">
<dt> <dt>
<a href="#">Accordion Header 1</a> Accordion Header 1
</dt> </dt>
<dd> <dd>
Accordion Content 1 Accordion Content 1
</dd> </dd>
<dt> <dt>
<a href="#">Accordion Header 2</a> Accordion Header 2
</dt> </dt>
<dd> <dd>
Accordion Content 2 Accordion Content 2
</dd> </dd>
<dt> <dt>
<a href="#">Accordion Header 3</a> Accordion Header 3
</dt> </dt>
<dd> <dd>
Accordion Content 3 Accordion Content 3

View File

@ -9,11 +9,10 @@
*/ */
/* IE/Win - Fix animation bug - #4615 */ /* IE/Win - Fix animation bug - #4615 */
.ui-accordion { width: 100%; } .ui-accordion { width: 100%; }
.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 2px; zoom: 1; } .ui-accordion .ui-accordion-header { display: block; cursor: pointer; position: relative; margin-top: 2px; padding: .5em .5em .5em .7em; zoom: 1; }
.ui-accordion .ui-accordion-heading { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } .ui-accordion .ui-accordion-icons { padding-left: 2.2em; }
.ui-accordion-icons a.ui-accordion-heading { padding-left: 2.2em; } .ui-accordion .ui-accordion-noicons { padding-left: .7em; }
.ui-accordion-noicons a.ui-accordion-heading { padding-left: .7em; } .ui-accordion .ui-accordion-icons .ui-accordion-icons { padding-left: 2.2em; }
.ui-accordion-icons .ui-accordion-icons a.ui-accordion-heading { padding-left: 2.2em; }
.ui-accordion .ui-accordion-header .ui-accordion-header-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } .ui-accordion .ui-accordion-header .ui-accordion-header-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; overflow: auto; display: none; zoom: 1; } .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; overflow: auto; display: none; zoom: 1; }
.ui-accordion .ui-accordion-content-active { display: block; } .ui-accordion .ui-accordion-content-active { display: block; }

View File

@ -42,7 +42,6 @@ $.widget( "ui.accordion", {
.addClass( "ui-accordion-header ui-helper-reset ui-state-default ui-corner-all" ); .addClass( "ui-accordion-header ui-helper-reset ui-state-default ui-corner-all" );
this._hoverable( this.headers ); this._hoverable( this.headers );
this._focusable( this.headers ); this._focusable( this.headers );
this.headers.find( ":first-child" ).addClass( "ui-accordion-heading" );
this.headers.next() this.headers.next()
.addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" ); .addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" );
@ -95,11 +94,6 @@ $.widget( "ui.accordion", {
}); });
} }
// only need links in tab order for Safari
if ( !$.browser.safari ) {
this.headers.find( "a" ).attr( "tabIndex", -1 );
}
this._setupEvents( options.event ); this._setupEvents( options.event );
}, },
@ -146,9 +140,6 @@ $.widget( "ui.accordion", {
.removeAttr( "tabIndex" ) .removeAttr( "tabIndex" )
.find( "a" ) .find( "a" )
.removeAttr( "tabIndex" ) .removeAttr( "tabIndex" )
.end()
.find( ".ui-accordion-heading" )
.removeClass( "ui-accordion-heading" );
this._destroyIcons(); this._destroyIcons();
// clean up content panels // clean up content panels