开发者

how to change selected value color in select box in jQuery Mobile?

开发者 https://www.devze.com 2023-03-07 04:01 出处:网络
I need to know how to change the selected value colori n select box in jQuery Mobile in 开发者_高级运维iPad? Currently, it\'s ok in native Safari browser. When I render it in iPad Safari browser, it d

I need to know how to change the selected value colori n select box in jQuery Mobile in 开发者_高级运维iPad? Currently, it's ok in native Safari browser. When I render it in iPad Safari browser, it doesn't work.

Please check the following Image. I want to change different color to "Pink NRIC" when selected instead of white color.

how to change selected value color in select box in jQuery Mobile?


Now I know how to change the color of selected combo in jQueryMobile. Here is the solution.

The first part is I need to add new class name for active select box in stylesheet.

ui-select-active {color:#0000a0; text-shadow: 0 -1px 1px #ffffff;}

After that, I need to declare above class name in jQueryMobile javascript file.

We need to add following coding after this "activeBtnClass: "ui-btn-active","

activeSelectClass: "ui-select-active",

Final part is we need to change existing coding in line 3491.

/* original coding */
button.addClass( $.mobile.activeBtnClass );

/* change to this one */
button.addClass( $.mobile.activeSelectClass );

Change jQueryMobile Select Box active style color in iPad safari

0

精彩评论

暂无评论...
验证码 换一张
取 消