icheck

Check/Uncheck - ifChecked not working

独自空忆成欢 提交于 2019-12-06 12:19:53
UPDATE: I'm using the following plugin I'm trying to check if the checkbox is checked when the user refresh the page or reload the page and here is what I have used but I have done the debugging and it never execute the second IF condition $('input').on('ifChecked', function (event) { if ($("input#CreatePart").is(':checked')) { alert('checked'); } }); $('input').on('ifUnchecked', function (event) { if ($("input#CreatePart").is(':checked')) { alert('un-checked'); } }); <input checked="checked" class="icheck" data-val="true" data-val-required="The Create new Part field is required." id=

How to enable/disable bootstrap selectpicker by ickeck checkbox

こ雲淡風輕ζ 提交于 2019-12-05 09:39:20
问题 There are selectpicker beside checkbox . I want if checkbox is checked, selectpicker will be enable, if unchecked, selectpicker will be disable. I wrote this which was not working ( Here is the fiddle ): $('.checkBox').on('ifChecked', function(event) { $(this).parents('.clearfix').find('.selectpicker').removeAttr('disabled'); }); $('.checkBox').on('ifUnchecked', function(event) { $(this).parents('.clearfix').find('.selectpicker').attr('disabled'); }); 回答1: You should refresh the selectpicker

iCheck jQuery blocks custom script

拟墨画扇 提交于 2019-12-05 02:31:49
I used "iCheck jQuery" to modificate the style of the checkbox. But when i add a iCheck script - my onlick metod stops working. Why it happening? <input id="my_cb" type="checkbox" value="yes_n" onclick="hide_row_metod()"/> <script> $(document).ready(function(){ $('#my_cb').iCheck({ checkboxClass: 'icheckbox_square-blue', radioClass: 'iradio_square-blue', increaseArea: '20%' // optional }); }); </script> My script: <script> function hide_row_metod() { if(document.getElementById('my_cb').checked){ document.getElementById('row1').style.display = "none"; }else{ document.getElementById('row1')

Make radio buttons over power background image

巧了我就是萌 提交于 2019-12-04 07:07:56
问题 I am using jquery steps and icheck with bootstrap. The problem I am having is with my jquery steps I can not get the icheck radio buttons to work. In the picture below when you try to change the radio buttons in the table nothing happens. But on the bottom of the picture I am using the same exact code and when you hover or select a radio button it is working perfect. I am thinking the css for the jquery steps has some sort of code that just appearing to make the radio buttons just look like

Integrate iCheck plugin with knockout js

别来无恙 提交于 2019-12-04 04:34:00
问题 Can somebody help me to correctly integrate iCheck plugin with knockout ? because I tried to use custom binding to initialize the plugin to my radio button but it's not updating the value of the view model. HTML <div data-bind="foreach: InstituteContactNumber"> <div class="controls multiple-controllers"> <input type="hidden" data-bind="value: CNoId" /> <input class="tb-contact-no" type="text" data-bind="value: CNo" />   **<input type="radio" name="radio-cno" data-bind="RadioButton: { checked:

Radio box, get the checked value [iCheck]

烈酒焚心 提交于 2019-12-04 00:26:40
问题 Basic radio box <div class="adv_filter"> <li> <input type="radio" name="letter_type" data-custom="Text" value="0"> Text</li> </li> <li> <input type="radio" name="letter_type" data-custom="Text" value="0"> Text</li> </li> </div> iCheck transformation <!-- iCheck output format <div class="adv_filter"> <li> <div class="iradio_square-orange checked" aria-checked="true" aria-disabled="false" style="position: relative;"><input type="radio" name="letter_type" data-custom="Text" value="0" style=

How to enable/disable bootstrap selectpicker by ickeck checkbox

我们两清 提交于 2019-12-03 22:21:03
There are selectpicker beside checkbox . I want if checkbox is checked, selectpicker will be enable, if unchecked, selectpicker will be disable. I wrote this which was not working ( Here is the fiddle ): $('.checkBox').on('ifChecked', function(event) { $(this).parents('.clearfix').find('.selectpicker').removeAttr('disabled'); }); $('.checkBox').on('ifUnchecked', function(event) { $(this).parents('.clearfix').find('.selectpicker').attr('disabled'); }); You should refresh the selectpicker once the change is done here is a working fiddle Code to refresh the UI is $('.selectpicker').selectpicker(

Integrate iCheck plugin with knockout js

五迷三道 提交于 2019-12-01 22:34:30
Can somebody help me to correctly integrate iCheck plugin with knockout ? because I tried to use custom binding to initialize the plugin to my radio button but it's not updating the value of the view model. HTML <div data-bind="foreach: InstituteContactNumber"> <div class="controls multiple-controllers"> <input type="hidden" data-bind="value: CNoId" /> <input class="tb-contact-no" type="text" data-bind="value: CNo" />   **<input type="radio" name="radio-cno" data-bind="RadioButton: { checked: IsPrimary }" />** <i class="fa fa-trash-o ctr-btn" style="color: red;" data-bind="click: $parent

iCheck控件ifClicked和ifChanged事件的讨论

假装没事ソ 提交于 2019-11-30 18:10:19
前端环境:Jquery+Bootstrap,checkbox使用了iCheck 关于iCheck控件点击事件的处理,其中有两个相关事件ifClicked和ifChanged 经过实验发现,ifClicked是点击的时候触发,此时check状态还没变化 ifChanged是状态变化后触发。 也就是说,当点击checkbox的时候,触发顺序是: ifClicked事件-->checkbox check状态变化-->ifChanged事件 如果有其他逻辑触发iCheck的.iCheck('check')和.iCheck('uncheck'),改变状态时,会直接触发ifChanged事件,不会触发ifClicked。 (备注:看网上也有人提出ifChanged事件在check状态变化之前触发(讨论链接: https://bbs.csdn.net/topics/391953382 ),我也不知道是怎么回事。这是我自己测试的结果,而且从ifChanged这个事件命名来看,也应该是在状态变化之后来触发的。) 假如我们需要某些关联操作,需要明确指定点击的时候才要触发某些事件(而不是状态变化的时候触发),但是点击的时候check状态又没有发生变化,此时获取状态是错误的。 上面提到的帖子里提到用setTimeout定时器人为模拟一个异步操作的方法。这个方法,也有弊端,时间间隔设定要恰当

Integration of Angular and JQuery.iCheck by using a directive is not working

末鹿安然 提交于 2019-11-30 06:53:20
I'm trying to integrate JQuery.iCheck (plugin for checkbox&Radio buttons styling). I followed few suggestions here that said that the way to integrate a jQuery plugins to be fully compatible with Angular ngRepeat is by using directives . So I implemented a directive : webApp.directive('icheck', function($timeout, $parse) { return { link: function($scope, element, $attrs) { return $timeout(function() { var ngModelGetter, value; ngModelGetter = $parse($attrs['ngModel']); value = $parse($attrs['ngValue'])($scope); return $(element).iCheck({ checkboxClass: 'icheckbox_minimal', radioClass: 'iradio