Ser*_*hiy 5 javascript jquery jquery-ui jquery-mobile
我有一些HTML,我在客户端使用JS生成.我仍然希望将jQuery Mobile UI的样式和功能应用于这些对象.我似乎无法弄清楚怎么样......
说我生成一个:
<div data-role="fieldcontain">
<label for="select-choice-1" class="select">Choose shipping method:</label>
<select name="select-choice-1" id="select-choice-1">
<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>
Run Code Online (Sandbox Code Playgroud)
并希望通过页面内的jQuery Mobile UI呈现它......如何做到这一点?
我知道使用标准的jQuery UI我只需按以下方式拨打电话:
$("#select-choice-1").buttonset();
Run Code Online (Sandbox Code Playgroud)
jQuery Mobile UI有这样的东西吗?
更新!
是的!带有事件的新实施刚刚落地!
http://jquerymobile.com/blog/2011/07/22/jquery-mobile-team-update-week-of-july-18th/
现在在 beta2 中,将有一个create
在元素上触发的事件将导致其渲染。
当 beta2 发布时我会更新常见问题解答。
找到添加到 DOM 的最顶层元素并调用.page()
它。这个问题实际上重复了许多其他标记为 jquery-mobile 的问题,因此我创建了一个简短的教程,以便不再每次都再次描述它。
请参阅此处的第一篇文章:http ://jquerymobiledictionary.dyndns.org/faq.html
归档时间: |
|
查看次数: |
4752 次 |
最近记录: |