jQuery Mobile在选择中删除图标光盘背景 [英] jQuery Mobile Remove the icon disc background in select

查看:88
本文介绍了jQuery Mobile在选择中删除图标光盘背景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用PhoneGap / Cordova编写了我的第一个jQuery Mobile应用程序,虽然我有一些打嗝,它的样式是我想要的,我管理得很好。

I'm writing my first jQuery Mobile app with PhoneGap/Cordova, and although I've had a few hiccups styling it just how I want, I've managed quite well.

这是直到我碰到形式。当我使用jQuery设置一个select元素,有没有办法删除图标的光盘背景?我尝试为该元素分配一个 ui-nodisc-icon 类,但它不工作。

That's until I came across forms. When I set a select element using jQuery, is there any way to remove the disc background of the icon? I tried assigning a class of ui-nodisc-icon to the element, but it's not working.

思考使用我自己的图标实现与FontAwesome,但我想知道是否有一个方法来直接使用JQM。

I'm thinking of using my own icon implementation with FontAwesome, but I'd like to know if there's a way to do it directly with JQM.

推荐答案

您需要将其添加到 div 换行选择菜单。没有 static 解决方案,因为jQM在小部件增强时在div中换行 select

You need to add it to div wrapping select menu. There is no static solution for this, as jQM wraps select in a div upon widget enhancement.

$("#selectID").closest("div").addClass("ui-nodisc-icon");

这篇关于jQuery Mobile在选择中删除图标光盘背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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