</div>\r
<h3><a href="#">Section 3</a></h3>\r
<div>\r
- <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>\r
- <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>\r
- <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>\r
<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>\r
<ul>\r
<li>List item</li>\r
--- /dev/null
+<!doctype html>\r
+<html>\r
+ <head>\r
+ <title>Accordion Visual Test : UL</title>\r
+ <link rel="stylesheet" href="../../static/static.css" type="text/css" />\r
+ <link rel="stylesheet" href="../../../themes/base/ui.base.css" type="text/css" />\r
+ <link rel="stylesheet" href="../../../themes/base/ui.theme.css" type="text/css" title="ui-theme" />\r
+ <script type="text/javascript" src="../../../jquery-1.3.1.js"></script>\r
+ <script type="text/javascript" src="../../../ui/ui.core.js"></script>\r
+ <script type="text/javascript" src="../../../ui/ui.accordion.js"></script>\r
+ <script type="text/javascript">\r
+ $(function(){\r
+ $("#accordion").accordion()\r
+ });\r
+ </script>\r
+ </head>\r
+ <body>\r
+ <ul id="accordion">\r
+ <li>\r
+ <h2>\r
+ <a href="#">Accordion Header 1</a>\r
+ </h2>\r
+ <div>\r
+ Accordion Content 1\r
+ <ul>\r
+ <li>Some list item</li>\r
+ <li>Some list item</li>\r
+ </ul>\r
+ </div>\r
+ </li>\r
+ <li>\r
+ <h2>\r
+ <a href="#">Accordion Header 2</a>\r
+ </h2>\r
+ <div>Accordion Content 2</div>\r
+ </li>\r
+ <li>\r
+ <h2>\r
+ <a href="#">Accordion Header 3</a>\r
+ </h2>\r
+ <div>Accordion Content 2</div>\r
+ </li>\r
+ </ul>\r
+ </body>\r
+</html>\r
/* Accordion
----------------------------------*/
.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
-.ui-accordion li {display: inline;}
-.ui-accordion .ui-accordion-content li {display: list-item;}
+.ui-accordion .ui-accordion-li-fix { display: inline; }
.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em 2.2em; }
.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
}
this.element.addClass("ui-accordion ui-widget ui-helper-reset");
+
+ // in lack of child-selectors in CSS we need to mark top-LIs in a UL-accordion for some IE-fix
+ if (this.element[0].nodeName == "UL") {
+ this.element.children("li").addClass("ui-accordion-li-fix");
+ }
this.headers = this.element.find(o.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all")
.bind("mouseenter.accordion", function(){ $(this).addClass('ui-state-hover'); })
clearStyle: false,
event: "click",
fillSpace: false,
- header: "> li :first,> :not(li):even",
+ header: "> li > :first-child,> :not(li):even",
icons: {
header: "ui-icon-triangle-1-e",
headerSelected: "ui-icon-triangle-1-s"