我根据http://jqueryui.com/accordion/#custom-icons
实现了一个简单的JQuery手风琴小部件出于某种原因,下拉图标(ui-icon)位于我的部分标题文本中:
还有其他人经历过这个吗?
HTML:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>jQuery UI Accordion - Default functionality</title>
</head>
<body>
<div id="accordion">
<h3>Section 1</h3>
<div>
<p>
Mauris mauris ante...shortened.
</p>
</div>
<h3>Section 2</h3>
<div>
<p>
Sed non urna...shortened.
</p>
</div>
<h3>Section 3</h3>
<div>
<p>
Nam enim risus...(shortened).
</p>
<ul>
<li>List item one</li>
<li>List item two</li>
<li>List item three</li>
</ul>
</div>
<h3>Section 4</h3>
<div>
<p>
Cras dictum....(shortened).
</p>
<p>
Suspendisse eu nisl...(shortened).
</p>
</div>
</div>
</body>
</html>
的CSS:
body {
font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif";
font-size: 62.5%;
}
的javascript:
$("#accordion").accordion();
谢谢!
答案 0 :(得分:1)
我明白了!我使用的是1.8.2版本的jquery-ui.css,jquery-1.8.2.js和jquery-ui.js。我假设存在某种冲突。
一旦我更改为以下版本,下拉图标就会正确显示...
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.8.3.js"></script>
<script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>