问题标签 [icheck]

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 回答
666 浏览

javascript - jQuery i-Check 插件相同的类名 - 检索两个不同的值

我正在使用 I-check 插件,我试图从代表两个不同字段的两个输入字段中检索值。

html:

jQuery.ajax

问题不是检索值,问题是分离值,因为我无法更改类名。

我通过以下方式检索价值

现在的问题是我在两种不同的表示中得到了相同的值。

因此,例如,如果选择了星级 - 我在这里得到的值都是 1.0,但实际上它在酒店类型中应该是空的。问题在于标识符“.i-check”。我试图向两者添加一个 ID 类,因此一个具有 id="starrating" 和另一个 id="hoteltype" ,然后这样做:

这似乎不适用于 I-Check 插件,我该如何解决这个问题,以便将两个值分开?

0 投票
0 回答
74 浏览

jquery - 测验测试-icheck jquery

我有这个代码:

这是一个测验,一切正常,但是当我检查从按钮到顶部的单选按钮时,一切都坏了。我想要这样的东西:当我在第一个问题中检查是或否时,我的下一个按钮将被隐藏。之后,当我在第二个问题中检查是或可能时,我的按钮旁边将可见。重要提示:必须在第一个问题中选中一个单选按钮!如果选中了第一个问题中的任何单选按钮,而我从第二个问题中检查了带有 val()== no 的按钮,则会显示另一个 div,并且将隐藏下一个按钮。在我检查此 div 中的任何值后,将显示下一个按钮。q();

0 投票
1 回答
530 浏览

javascript - 与 Remodal 配对后多次触发 iCheck 事件

我目前正在使用:

  • remodalJS 0.6.4
  • iCheckJS 1.0.2

UX 的设计使 iCheck 复选框和收音机充当过滤器并存在于 remodal 中。当我将这两个库配对使用时,发生了奇怪的事情:

chrome devtool 控制台截图

这是 Chrome 的控制台输出,

ifChecked选中选择(通过无线电或复选框)时,要多一次射击一次。

对应的 bower.json

0 投票
1 回答
291 浏览

firefox - 我 check.js 不能在 Firefox 中工作

icheck.js 在 chrome 和 IE 中工作,但在 Firefox 中不工作

上面的脚本在 Firefox 中不起作用请帮助我

0 投票
1 回答
1077 浏览

javascript - 带有 iCheck 的单选按钮仅在确认返回 true 时更改值

我用iCheck创建了现代单选按钮,有四个选项。当用户更改单选按钮时,我会弹出一条确认消息“你确定吗?”

如果确认返回false,我想返回上一个单选按钮,但现在它不返回上一个单选按钮。

这是代码的一部分:

0 投票
1 回答
781 浏览

javascript - iCheck on() 方法回调不起作用

我正在使用使用iCheck v1.0.2的引导模板

当我创建这样的输入时:

它生成结果:

我想检测此复选框的更改。正如文档所说,有一种方法:

但这完全没有任何作用。其他所有回调都相同。我错过了什么吗?

0 投票
1 回答
1267 浏览

jquery - 如果未使用 jquery 中的 icheck() 检查复选框,请检查复选框

有很多复选框。如果复选框未选中,我必须选中。

但这不起作用。我在 jquery 中尝试过。

0 投票
1 回答
553 浏览

jquery - iCheck sum and subtract values

Using the library of iCheck I have a basic html:

So then I have my jQuery:

What I'm trying to accomplish is very simple without the use of iCheck, but since I'm learning this library and there is no documentation for this kind of operation using iCheck(I couldn't find any) I need to "sum" the values from the radio input to the checkbox
if radio input 1 is selected then the value is 1, then check if a checkbox has been checked if so, then sum that value to the radio button that has been checked:
like: 1radio + 10checkbox = 11, so 11 is my result but what if:
2radio + 10checkbox + 40checkbox then = 52... correct?, but if the user uncheck one of the checkboxes then subtract that value... with the code above kid of, sort of working... I manage to sum one radio and one checkbox but if I select a different radio button it doesn't do nothing until I select another checkbox but it ignores the first checkbox and when I deselect a checkbox it gives me the wrong result... I can't make it work using iCheck...

0 投票
1 回答
119 浏览

javascript - 如何将对象发送到复选框上的角度指令

我正在尝试使用指令使用 iCheck 复选框。我的指令是这样设置的。

我的复选框在 ng-repeat 中。我想将当前对象发送给函数以进一步处理它。我的html是这样设置的。

每次我更改任何复选框时都会触发 modelChanged。但我正在尝试访问 modelChanged 函数中的项目以进一步处理它。请指导。

0 投票
0 回答
181 浏览

javascript - iCheck 库与单选按钮组一起使用

我使用此代码创建链接以下载一些项目:

使用这个 javascript 代码

选中第一个单选按钮并显示第一个链接。当我选择另一个单选按钮时,它会显示另一个链接。但只有当我在页面上有一组单选按钮时它才能正常工作。任何人都可以帮我编写多个组的代码吗?