使用此:jQuery Mobile的可摺疊的div不正確的造型
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Page Title</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b3/jquery.mobile-1.0b3.min.css" />
<script src="http://code.jquery.com/jquery-1.6.3.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0b3/jquery.mobile-1.0b3.min.js"> </script>
</head>
<body>
<div data-role="collapsible" data-theme="a" data-content-theme="a">
<h3>Header swatch A</h3>
<p>I'm the collapsible content with a themed content block set to "A".</p>
</div>
</body>
</html>
我發現,擴大可摺疊沒有預期的主題造型 - 事實上,它現在沒有。在查看頁面的源代碼並比較它將在jQuery手機上的示例頁面(http://jquerymobile.com/test/docs/content/content-collapsible.html)看起來,下面的類從動態創建的div中丟失圍繞標題下方的擴大段落內的可摺疊包裝:
ui-btn-up-a ui-corner-bottom
運行示例頁面的代碼是他們自己的內部代碼,而不是一樣被用於部署所以我猜有東西在他們的這不在動態創建類的beta版本中。
問題是,是否有人知道錯誤是什麼以及如何解決這個問題?
看看頁面http://jquerymobile.com/test/docs/content/content-collapsible.html標題下的「Theming Collapsible Headers」,你可以看到我想要的成果,內容是以在底部有一個很好的圓形邊框,所以它出現在一個帶擴展頭的塊中。它通過在由js創建的包裝div上包含類「ui-btn-up-a」來實現,而不是核心html代碼的一部分。當我嘗試複製它時,「ui-btn-up-a」不適用於包裝div,因此缺乏樣式。 –