Jquery-mobile-collapsible-nested
提供:Dev Guides
jQuery Mobile-ネストされた折りたたみ
説明
折りたたみは、他の折りたたみ可能なコンテンツ内にネストできます。
例
次の例は、jQuery Mobileでの_nested collapsible_の使用を示しています。
<!DOCTYPE html>
<html>
<head>
<title>Collapsible nested</title>
<meta name = "viewport" content = "width = device-width, initial-scale = 1">
<link rel = "stylesheet" href = "https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
<script src = "https://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src = "https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
</head>
<body>
<div data-role = "collapsible">
<h1>Click me</h1>
<p>This is collapsible content.</p>
<div data-role = "collapsible">
<h1>Click me</h1>
<p>This is nested collapsible content.</p>
</div>
</div>
</body>
</html>
出力
上記のコードがどのように機能するかを確認するために、次の手順を実行してみましょう-
- 上記のHTMLコードを collapsible_nestedl ファイルとしてサーバーのルートフォルダーに保存します。
- このHTMLファイルをhttp://localhost/collapsible_nestedlとして開くと、次の出力が表示されます。