【问题标题】:JQuery Accordion Widget Dropdown Icon Incorrect PositionJQuery Accordion 小部件下拉图标位置不正确
【发布时间】:2012-11-29 19:04:09
【问题描述】:

我根据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();​

谢谢!

【问题讨论】:

    标签: jquery jquery-ui


    【解决方案1】:

    我想通了!我为 jquery-ui.css、jquery-1.8.2.js 和 jquery-ui.js 使用 1.8.2 版。我假设存在某种冲突。

    一旦我更改为以下版本,下拉图标就会正确显示...

    <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>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-03-11
      • 2020-06-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多