问题标签 [jquery-mobile-radio]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
92 浏览

jquery - jquery-mobile 单选按钮显示的错误

嗨,我正在创建一个移动应用程序,但我的单选按钮有问题,它们会随机改变外观。我不明白为什么。在导航器上它很好,但在手机上它非常难看......冠军手机和电话是由ajax请求请求的(不知道是否重要)。

拍了2屏

  1. 这个看起来不是手机上的错误 在此处输入图像描述
  2. 这个看起来是错误的(它比第一个更常见)。 在此处输入图像描述

在评论中做了一个jsfiddle

0 投票
1 回答
1305 浏览

javascript - How do I display vertical radio buttons in the horizontal style using jquery-mobile?

Jquery-mobile can display sets of radio buttons on a horizontal grouping with the actual selection box suppressed and selection indicated by the background text colour by adding the attribute 'data-type="horizontal"'.

It can also display a vertical set, which retains the boxes and does not set the background colour, by setting 'data-type="vertical"'.

Is there a way to change the vertical styling to match the horizontal styling? That is, suppress the boxes and use the background text colour to indication selection.

FYI, we're using jquery-mobile 1.3.2.

0 投票
1 回答
465 浏览

jquery-mobile - JQuery Mobile 可折叠单选按钮

我尝试创建一种替代方式来选择一组选项,例如在选择小部件中。

我的自定义选择是用一个可折叠的和一组单选按钮构建的,它们比 JQM 选择要轻一些,因为非本地选择菜单被转换为弹出窗口或对话框。特别是在面板内使用时,而且对我来说更容易进行数据绑定。

在此处输入图像描述

我动态地将标记插入到面板内部。面板也可以有不同的内容,这些内容将在 panel.onbeforeopen 中初始化。现在,我只有在创建可折叠项后才能绑定单选按钮更改事件。我尝试过这样的事情但不起作用:

在手风琴初始化后,如何在正确的时间绑定单选按钮更改事件?有没有办法将整个单选组的更改事件绑定到每个单选按钮?

Plunker:http ://plnkr.co/edit/OSocuRPQIzuk367dE6XS?p=preview