jquery-ui/tests/unit/accordion/accordion.html

164 lines
4.3 KiB
HTML
Raw Normal View History

2011-04-04 13:12:08 +00:00
<!doctype html>
2008-06-04 02:34:33 +00:00
<html lang="en">
<head>
<meta charset="utf-8">
2008-06-04 02:34:33 +00:00
<title>jQuery UI Accordion Test Suite</title>
<link rel="stylesheet" href="../../../themes/base/jquery.ui.accordion.css">
2011-03-03 01:44:26 +00:00
<script src="../../../jquery-1.5.1.js"></script>
<script>
$.uiBackCompat = false;
</script>
<script src="../../../ui/jquery.ui.core.js"></script>
<script src="../../../ui/jquery.ui.widget.js"></script>
<script src="../../../ui/jquery.ui.accordion.js"></script>
<link rel="stylesheet" href="../../../external/qunit.css">
<script src="../../../external/qunit.js"></script>
<script src="../../jquery.simulate.js"></script>
<script src="../testsuite.js"></script>
2008-06-04 02:34:33 +00:00
<script>
2011-04-15 15:29:26 +00:00
function accordion_state( accordion ) {
2011-01-25 00:20:09 +00:00
var expected = $.makeArray( arguments ).slice( 1 );
var actual = accordion.find( ".ui-accordion-content" ).map(function() {
return $( this ).css( "display" ) === "none" ? 0 : 1;
}).get();
deepEqual( actual, expected );
}
2011-06-13 18:51:13 +00:00
function accordion_equalHeights( accordion, min, max ) {
var sizes = [];
2011-01-25 00:20:09 +00:00
accordion.find( ".ui-accordion-content" ).each(function() {
sizes.push( $( this ).outerHeight() );
});
2011-01-25 00:20:09 +00:00
ok( sizes[ 0 ] >= min && sizes[ 0 ] <= max,
"must be within " + min + " and " + max + ", was " + sizes[ 0 ] );
deepEqual( sizes[ 0 ], sizes[ 1 ] );
deepEqual( sizes[ 0 ], sizes[ 2 ] );
2011-01-25 00:20:09 +00:00
}
function accordionSetupTeardown() {
var animated = $.ui.accordion.prototype.options.animated;
return {
setup: function() {
$.ui.accordion.prototype.options.animated = false;
},
teardown: function() {
$.ui.accordion.prototype.options.animated = animated;
}
};
}
</script>
<script src="accordion_defaults.js"></script>
2011-01-25 00:20:09 +00:00
<script src="accordion_core.js"></script>
<script src="accordion_events.js"></script>
<script src="accordion_methods.js"></script>
<script src="accordion_options.js"></script>
<script src="../swarminject.js"></script>
<style>
#qunit-fixture { font-size: 10pt; font-family: "trebuchet ms", verdana, arial; }
#list, #list1 *, #navigation, #navigation * { margin: 0; padding: 0; font-size: 12px; line-height: 15px; }
</style>
2008-06-04 02:34:33 +00:00
</head>
2008-06-07 19:26:35 +00:00
<body>
<h1 id="qunit-header">jQuery UI Accordion Test Suite</h1>
<h2 id="qunit-banner"></h2>
<div id="qunit-testrunner-toolbar"></div>
<h2 id="qunit-userAgent"></h2>
2011-03-23 13:51:42 +00:00
<ol id="qunit-tests"></ol>
<div id="qunit-fixture">
2008-06-04 02:34:33 +00:00
2011-03-23 13:51:42 +00:00
<div id="list1" class="foo">
<h3 class="bar"><a class="anchor">There is one obvious advantage:</a></h3>
<div class="foo">
<p>
You've seen it coming!
<br/>
Buy now and get nothing for free!
<br/>
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>
<div class="foo">
<p>
your bear, you have to admit it!
<br/>
No, we aren't selling bears.
</p>
<p>
We could talk about renting one.
</p>
</div>
2011-03-23 13:51:42 +00:00
<h3 class="bar"><a class="anchor">Rent one bear, ...</a></h3>
<div class="foo">
<p>
get two for three beer.
</p>
<p>
And now, for something completely different.
</p>
</div>
</div>
2008-06-04 02:34:33 +00:00
2009-08-11 18:58:03 +00:00
<div id="navigationWrapper">
<ul id="navigation">
<li>
<h2><a href="?p=1.1.1">Guitar</a></h2>
<ul>
<li><a href="?p=1.1.1.1">Electric</a></li>
<li><a href="?p=1.1.1.2">Acoustic</a></li>
<li><a href="?p=1.1.1.3">Amps</a></li>
<li><a href="?p=1.1.1.4">Effects</a></li>
<li><a href="?p=1.1.1.5">Accessories</a></li>
</ul>
</li>
<li>
<h2><a href="?p=1.1.2"><span>Bass</span></a></h2>
<ul>
<li><a href="?p=1.1.2.1">Electric</a></li>
<li><a href="?p=1.1.2.2">Acoustic</a></li>
<li><a href="?p=1.1.2.3">Amps</a></li>
<li><a href="?p=1.1.2.4">Effects</a></li>
<li><a href="?p=1.1.2.5">Accessories</a></li>
<li><a href="?p=1.1.2.5">Accessories</a></li>
<li><a href="?p=1.1.2.5">Accessories</a></li>
</ul>
</li>
<li>
<h2><a href="?p=1.1.3">Drums</a></h2>
<ul>
<li><a href="?p=1.1.3.2">Acoustic</a></li>
<li><a href="?p=1.1.3.3">Electronic</a></li>
<li><a href="?p=1.1.3.6">Accessories</a></li>
</ul>
</li>
</ul>
2009-08-11 18:58:03 +00:00
</div>
<dl id="accordion-dl">
<dt>
<a href="#">Accordion Header 1</a>
</dt>
<dd>
Accordion Content 1
</dd>
<dt>
<a href="#">Accordion Header 2</a>
</dt>
<dd>
Accordion Content 2
</dd>
<dt>
<a href="#">Accordion Header 3</a>
</dt>
<dd>
Accordion Content 3
</dd>
</dl>
2008-06-04 02:34:33 +00:00
</div>
2008-06-07 19:26:35 +00:00
</body>
</html>