我有一个关于在 jQuery 中转换 HTML 的问题。
http://jsfiddle.net/aldimeola1122/nMR85/1118/
我如何在 jQuery 中编写此 HTML 代码?:
$('#deneme').append(
ul
data-role="listview"
data-split-icon="gear"
data-split-theme="d"
data-inset="true")...
这不是相同的代码:
$('#deneme').append('
<ul data-role="listview"
data-split-icon="gear"
data-split-theme="d"
data-inset="true">
<li>
<a href="#"><img src="../../_assets/img/album-bb.jpg">
<h2>Broken Bells</h2>
<p>Broken Bells</p>
</a>
<a href="#purchase"
data-rel="popup"
data-position-to="window"
data-transition="pop">
Purchase album
</a>
</li>
</ul>
');
</br>
<ul data-role="listview" data-split-icon="gear" data-split-theme="d" data-inset="true">
<li>
<a href="#">
<img src="../../_assets/img/album-bb.jpg">
<h2>Broken Bells</h2>
<p>Broken Bells</p>
</a>
<a href="#purchase"
data-rel="popup"
data-position-to="window"
data-transition="pop">
Purchase album
</a>
</li>
</ul>
它应该是这样的:
<ul data-role="listview"
data-split-icon="gear"
data-split-theme="d"
data-inset="true"
class="ui-listview ui-listview-inset ui-corner-all ui-shadow">
但这告诉我:
<ul data-role="listview"
data-split-icon="gear"
data-split-theme="d"
data-inset="true">
这表明我没有课。