Mobile Jquery(II) Jquery mobile what can it do for you

本文介绍了 Jquery Mobile 的主要功能,包括六种过渡效果、角色类型按钮、可折叠内容块、触摸优化表单元素、列表视图及主题样式等。同时还详细列举了各种表单元素的实现方式,如文本输入、复选框、滑动条等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Mobile Jquery(II) Jquery mobile what can it do for you

1. transition type
<li><a href="./speakers.html" data-transition="flip">Speakers</a></li>

There are 6 types:
slide Slide right to left (left to right if tapping the Back button). This is the default.
slideup
slidedown
pop Expand the new page (contract it if tapping the Back button). Great for dialogs and popups.
flip Flip the old page out and the new page in, like flipping a card.
fade Fade the new page in (fade it out if tapping the Back button).

2. data role type: button
<p><a href="./schedule.html" data-role="button">Button</a></p>

3. Collapsible content blocks
<div data-role="collapsible" data-state="collapsed">
<h2>About this demo</h2>
<p>This app rocks!</p>
<p>This is the 3 line</p>
<p>This is the 4 line</p>
</div>

4. Touch-optimized form elements
<form action="#" method="get">
</form>

just a form in content page.

text
<div data-role="fieldcontain">
<label for="name">Your Name:</label>
<input type="text" name="name" id="name" value="" />
</div>

checkbox
<div data-role="controlgroup">
<legend>Which Companies would you like?</legend>
<input type="checkbox" name="company" id="handsome" class="custom" />
<label for="handsome">Handsome</label>

<input type="checkbox" name="company" id="ghca" class="custom" />
<label for="ghca">GH-CA</label>

<input type="checkbox" name="company" id="enrising" class="custom" />
<label for="enrising">Enrising</label>
</div>

range
<div data-role="fieldcontain">
<label for="quantity">Number of Items:</label>
<input type="range" name="quantity" id="quantity" value="1" min="1" max="10" />
</div>

select-slider
<div data-role="fieldcontain">
<label for="gender">Gender:</label>
<select name="gender" id="gender" data-role="slider">
<option value="Man">Man</option>
<option value="Woman">Woman</option>
</select>
</div>

select-box
<div data-role="fieldcontain">
<label for="shippingDate">Shipping Date:</label>
<select name="shippingDate" id="shippingDate" data-native-menu="false">
<option value="standard">Standard: 7 day</option>
<option value="rush">Rush: 3 days</option>
<option value="express">Express: next day</option>
<option value="overnight">Overnight</option>
</select>
</div>

submit-button
<div class="ui-body ui-body-b">
<fieldset class="ui-grid-a">
<div class="ui-block-a">
<button type="submit" data-theme="d">Cancel</button>
</div>
<div class="ui-block-b">
<button type="submit" data-theme="a">Order Ice Cream</button>
</div>
</fieldset>
</div>

5. List views: Lists on steroids
List view with filter
<ul data-role="listview" data-inset="true" data-filter="true">
<li>
<a href="#">The Grapes of Wrath</a>
<a href="#">Buy This Book</a>
</li>
<li>
<a href="#">The Trial</a>
<a href="#">Buy This Book</a>
</li>
<li>
<a href="#">A Tale of Two Cities</a>
<a href="#">Buy This Book</a>
</li>
</ul>

listview with count
<ul data-role="listview" data-inset="true">
<li><a href="#">SuperWidgets</a> <span class="ui-li-count">14</span></li>
<li><a href="#">MegaWidgets</a> <span class="ui-li-count">0</span></li>
<li><a href="#">WonderWidgets</a> <span class="ui-li-count">327</span></li>
</ul>

6. theming
<p><a href="./schedule.html" data-role="button" data-theme="b">Button</a></p>

There are 5 type of themings: a, b, c, d, e

7. events
...snip...

references:
http://www.elated.com/articles/jquery-mobile-what-can-it-do-for-you/
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值