手风琴Jquery崩溃onClick

时间:2015-01-17 10:17:35

标签: javascript jquery html

我有手风琴,点击其中我希望手风琴应该崩溃 UP ,现在它崩溃。任何帮助。请参阅下面的代码: -

<link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css" />
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css" />
<script>
    $(function () {
        $("#accordion").accordion({
            header: "h3",
            collapsible: true,
            active: false
        });
    });
</script>

另请参阅HTML代码: -

 <div id="accordion">
      <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>
    </div>

1 个答案:

答案 0 :(得分:1)

可以用css旋转它们

&#13;
&#13;
.accordion{transform:rotate(180deg);}
.accordion h3,.accordion div{transform:rotate(180deg);}
&#13;
&#13;
&#13;

jsfiddle