如果从jquery mobile基础结构中走出来的做法是不好的做法。在我的例子中,我得到了完全相同的代码。但在另一个我在 -tag之前加了一个div 。这给了我另一个看,因为CSS是不正确的。 这不好吗?它打破了我的好看名单。有没有什么好的解决方案呢?html的jQuery手机结构
原因是因为我想对列表中的信息进行一些控制,以显示和隐藏与som jQuery的div。我会解决这个问题,让li -tag成为一个班级,然后隐藏并显示。但是我有点糊涂了abouth也无妨
如果我有这样的代码(采取从jQuery的演示页):
<li>
<a href="#">
<h2>
Stephen Weber</h2>
<p>
<strong>You've been invited to a meeting at Filament Group in Boston, MA</strong></p>
<p>
Hey Stephen, if you're available at 10am tomorrow, we've got a meeting with the
jQuery team.</p>
</a>
<p class="ui-li-aside">
<strong>6:24</strong>PM</p>
</li>
它会生成这个网站:
<li class="ui-btn ui-btn-icon-right ui-li-has-arrow ui-li ui-btn-up-c" data-corners="false"
data-shadow="false" data-iconshadow="true" data-wrapperels="div" data-icon="false"
data-iconpos="right" data-theme="c">
<div class="ui-btn-inner ui-li">
<div class="ui-btn-text">
<p class="ui-li-aside ui-li-desc">
<strong>6:24</strong> PM
</p>
<a class="ui-link-inherit" href="#">
<h2 class="ui-li-heading">
Stephen Weber</h2>
<p class="ui-li-desc">
<strong>You've been invited to a meeting at Filament Group in Boston, MA</strong>
</p>
<p class="ui-li-desc">
Hey Stephen, if you're available at 10am tomorrow, we've got a meeting with the
jQuery team.</p>
</a>
</div>
</div>
</li>
但是,如果我添加格在我的代码是这样的:
<li>
**<div>**
<a href="#">
<h2>
Stephen Weber</h2>
<p>
<strong>You've been invited to a meeting at Filament Group in Boston, MA</strong></p>
<p>
Hey Stephen, if you're available at 10am tomorrow, we've got a meeting with the
jQuery team.</p>
</a>
<p class="ui-li-aside">
<strong>6:24</strong>PM</p>
</div>
</li>
它会生成这个网站:
<li class="ui-li ui-li-static ui-btn-up-c">
<div>
<p class="ui-li-aside ui-li-desc">
<strong>6:24</strong> PM
</p>
<a class="ui-link" href="#">
<h2 class="ui-li-heading">
Stephen Weber</h2>
<p class="ui-li-desc">
<strong>You've been invited to a meeting at Filament Group in Boston, MA</strong>
</p>
<p class="ui-li-desc">
Hey Stephen, if you're available at 10am tomorrow, we've got a meeting with the
jQuery team.</p>
</a>
</div>
</li>
是这是一个不好的做法,告诉我你想达到这个是什么?也许我可以帮助你。 jQuery Mobile希望允许你改变它的基本构件结构,但你可以在它们之上工作。 – Gajotres 2013-04-09 12:50:02
正如@Gajotres所说,您可以通过更改JQM CSS类来操纵JQM。 – Omar 2013-04-09 12:56:42