jquery UI

=====================  accordion (可折叠的) ===========================

<!DOCTYPE html>
<html>
<head>
  <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" />
  <script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script>
  <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.core.js"></script>
  <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.accordion.js"></script>
  <script type="text/javascript">
  $(document).ready(function(){
    $("#accordion").accordion();
  });
  </script>
</head>
<body style="font-size:62.5%;">
 
<div id="accordion">
<h3><a href="#">Section 1</a></h3>
<div><p> Mauris mauris ante </p>
</div>
<h3><a href="#">Section 2</a></h3>
<div><p> Sed non urna. </p>
</div>
<h3><a href="#">Section 3</a></h3>
<div><p> Nam enim risus,</p>
<ul>
<li>List item one</li>
<li>List item two</li>
<li>List item three</li>
</ul>
</div>
<h3><a href="#">Section 4</a></h3>
<div><p>Cras dictum. </p>
      <p>Suspendisse eu nisl. </p>
</div>
</div>

</body>
</html>

你可能感兴趣的:(html,jquery,UI)