如何“关闭” jQuery Mobile的< select>的样式下降? [英] How to "turn off" jQuery Mobile's styling of <select> drop downs?

查看:71
本文介绍了如何“关闭” jQuery Mobile的< select>的样式下降?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要关闭jQuery Mobile的< select> 下拉式样。最终,我希望设备本身(iPhone,Android,Blackberry等)确定< select> 下拉菜单的外观。



目前我的标记是(选项数量减少用于显示):

 < div data-role =fieldcontain> 
< label for =state>状态:< / label>
< option value =a> A< / option>
< option value =b> B< / option>
< option value =c> C< / option>
< / select>


I need to turn off jQuery Mobile's styling of <select> drop downs. Ultimately I'd like the device itself (iPhone, Android, Blackberry, etc.) to determine how the <select> drop down looks.

Currently my markup is (option quantity reduced for display purposes):

<div data-role="fieldcontain">
    <label for="state">State:</label>
    <select name="state" id="state" data-role="none">
        <option value="MA">Massachusetts</option> 
        <option value="MI">Michigan</option> 
        <option value="MN" selected="selected">Minnesota</option> 
        <option value="MS">Mississippi</option> 
    </select> 
</div>

I tried using data-role="none" on the <select> but nothing changed.

Is there a way to "turn off" jQuery Mobile for just the select drop down?

解决方案

according to http://jquerymobile.com/test/docs/forms/docs-forms.html

If you'd prefer that a particular form control be left untouched by jQuery Mobile, simply give that element the attribute data-role="none". For example:

<label for="foo">
<select name="foo" id="foo"  data-role="none">
<option value="a" >A</option>
<option value="b" >B</option>
<option value="c" >C</option>
</select>

这篇关于如何“关闭” jQuery Mobile的&lt; select&gt;的样式下降?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆