<div class="demo">
<div id="accordion">
- <h3><a href="#">Section 1</a></h3>
+ <h3>Section 1</h3>
<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>
</div>
- <h3><a href="#">Section 2</a></h3>
+ <h3>Section 2</h3>
<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>
</div>
- <h3><a href="#">Section 3</a></h3>
+ <h3>Section 3</h3>
<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>
<ul>
<li>List item three</li>
</ul>
</div>
- <h3><a href="#">Section 4</a></h3>
+ <h3>Section 4</h3>
<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>
</div>
<div class="demo">
<div id="accordion">
- <h3><a href="#">Section 1</a></h3>
+ <h3>Section 1</h3>
<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>
</div>
- <h3><a href="#">Section 2</a></h3>
+ <h3>Section 2</h3>
<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>
</div>
- <h3><a href="#">Section 3</a></h3>
+ <h3>Section 3</h3>
<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>
<ul>
<li>List item three</li>
</ul>
</div>
- <h3><a href="#">Section 4</a></h3>
+ <h3>Section 4</h3>
<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>
</div>
<div class="demo">
<div id="accordion">
- <h3><a href="#">Section 1</a></h3>
+ <h3>Section 1</h3>
<div>
<p>
Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer
odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.
</p>
</div>
- <h3><a href="#">Section 2</a></h3>
+ <h3>Section 2</h3>
<div>
<p>
Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet
suscipit faucibus urna.
</p>
</div>
- <h3><a href="#">Section 3</a></h3>
+ <h3>Section 3</h3>
<div>
<p>
Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis.
<li>List item three</li>
</ul>
</div>
- <h3><a href="#">Section 4</a></h3>
+ <h3>Section 4</h3>
<div>
<p>
Cras dictum. Pellentesque habitant morbi tristique senectus et netus
<div id="accordionResizer" style="padding:10px; width:350px; height:220px;" class="ui-widget-content">
<div id="accordion">
- <h3><a href="#">Section 1</a></h3>
+ <h3>Section 1</h3>
<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>
</div>
- <h3><a href="#">Section 2</a></h3>
+ <h3>Section 2</h3>
<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>
</div>
- <h3><a href="#">Section 3</a></h3>
+ <h3>Section 3</h3>
<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>
<ul>
<li>List item three</li>
</ul>
</div>
- <h3><a href="#">Section 4</a></h3>
+ <h3>Section 4</h3>
<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>
</div>
<div class="demo">
<div id="accordion">
- <h3><a href="#">Section 1</a></h3>
+ <h3>Section 1</h3>
<div>
<p>
Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer
odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.
</p>
</div>
- <h3><a href="#">Section 2</a></h3>
+ <h3>Section 2</h3>
<div>
<p>
Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet
suscipit faucibus urna.
</p>
</div>
- <h3><a href="#">Section 3</a></h3>
+ <h3>Section 3</h3>
<div>
<p>
Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis.
<li>List item three</li>
</ul>
</div>
- <h3><a href="#">Section 4</a></h3>
+ <h3>Section 4</h3>
<div>
<p>
Cras dictum. Pellentesque habitant morbi tristique senectus et netus
<div class="demo">
<div id="accordion">
- <h3><a href="#">Section 1</a></h3>
+ <h3>Section 1</h3>
<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>
</div>
- <h3><a href="#">Section 2</a></h3>
+ <h3>Section 2</h3>
<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>
</div>
- <h3><a href="#">Section 3</a></h3>
+ <h3>Section 3</h3>
<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>
<ul>
<li>List item three</li>
</ul>
</div>
- <h3><a href="#">Section 4</a></h3>
+ <h3>Section 4</h3>
<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>
</div>
<div class="demo">
<div id="accordion">
- <h3><a href="#section1">Section 1</a></h3>
+ <h3>Section 1</h3>
<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>
</div>
- <h3><a href="#section2">Section 2</a></h3>
+ <h3>Section 2</h3>
<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>
</div>
- <h3><a href="#section3">Section 3</a></h3>
+ <h3>Section 3</h3>
<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>
<ul>
<li>List item</li>
<li>List item</li>
</ul>
- <a href="#othercontent">Link to other content</a>
</div>
</div>
<div id="accordion">
<div class="group">
- <h3><a href="#">Section 1</a></h3>
+ <h3>Section 1</h3>
<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>
</div>
</div>
<div class="group">
- <h3><a href="#">Section 2</a></h3>
+ <h3>Section 2</h3>
<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>
</div>
</div>
<div class="group">
- <h3><a href="#">Section 3</a></h3>
+ <h3>Section 3</h3>
<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>
<ul>
</div>
</div>
<div class="group">
- <h3><a href="#">Section 4</a></h3>
+ <h3>Section 4</h3>
<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>
</div>
<div id="qunit-fixture">
<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">
<p>
You've seen it coming!
Well, at least no free beer. Perhaps a bear, if you can afford it.
</p>
</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">
<p>
your bear, you have to admit it!
We could talk about renting one.
</p>
</div>
- <h3 class="bar"><a class="anchor">Rent one bear, ...</a></h3>
+ <h3 class="bar">Rent one bear, ...</h3>
<div class="foo">
<p>
get two for three beer.
<dl id="accordion-dl">
<dt>
- <a href="#">Accordion Header 1</a>
+ Accordion Header 1
</dt>
<dd>
Accordion Content 1
</dd>
<dt>
- <a href="#">Accordion Header 2</a>
+ Accordion Header 2
</dt>
<dd>
Accordion Content 2
</dd>
<dt>
- <a href="#">Accordion Header 3</a>
+ Accordion Header 3
</dt>
<dd>
Accordion Content 3
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 () {
expect( 13 );
var element = $( "#list1" ).accordion().accordion( "option", "active", 1 );
<div id="qunit-fixture">
<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">
<p>
You've seen it coming!
Well, at least no free beer. Perhaps a bear, if you can afford it.
</p>
</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">
<p>
your bear, you have to admit it!
We could talk about renting one.
</p>
</div>
- <h3 class="bar"><a class="anchor">Rent one bear, ...</a></h3>
+ <h3 class="bar">Rent one bear, ...</h3>
<div class="foo">
<p>
get two for three beer.
<dl id="accordion-dl">
<dt>
- <a href="#">Accordion Header 1</a>
+ Accordion Header 1
</dt>
<dd>
Accordion Content 1
</dd>
<dt>
- <a href="#">Accordion Header 2</a>
+ Accordion Header 2
</dt>
<dd>
Accordion Content 2
</dd>
<dt>
- <a href="#">Accordion Header 3</a>
+ Accordion Header 3
</dt>
<dd>
Accordion Content 3
*/
/* IE/Win - Fix animation bug - #4615 */
.ui-accordion { width: 100%; }
-.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 2px; zoom: 1; }
-.ui-accordion .ui-accordion-heading { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
-.ui-accordion-icons a.ui-accordion-heading { padding-left: 2.2em; }
-.ui-accordion-noicons a.ui-accordion-heading { padding-left: .7em; }
-.ui-accordion-icons .ui-accordion-icons a.ui-accordion-heading { padding-left: 2.2em; }
+.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-icons { padding-left: 2.2em; }
+.ui-accordion .ui-accordion-noicons { padding-left: .7em; }
+.ui-accordion .ui-accordion-icons .ui-accordion-icons { 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-content { padding: 1em 2.2em; border-top: 0; overflow: auto; display: none; zoom: 1; }
.ui-accordion .ui-accordion-content-active { display: block; }
.addClass( "ui-accordion-header ui-helper-reset ui-state-default ui-corner-all" );
this._hoverable( this.headers );
this._focusable( this.headers );
- this.headers.find( ":first-child" ).addClass( "ui-accordion-heading" );
this.headers.next()
.addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" );
});
}
- // only need links in tab order for Safari
- if ( !$.browser.safari ) {
- this.headers.find( "a" ).attr( "tabIndex", -1 );
- }
-
this._setupEvents( options.event );
},
.removeAttr( "tabIndex" )
.find( "a" )
.removeAttr( "tabIndex" )
- .end()
- .find( ".ui-accordion-heading" )
- .removeClass( "ui-accordion-heading" );
this._destroyIcons();
// clean up content panels