Menu
  • HOME
  • TAGS

Select all checkbox with icheck

jquery,checkbox,icheck

// Remove the checked state from "All" if any checkbox is unchecked $('.check').on('ifUnchecked', function (event) { $('#check-all').iCheck('uncheck'); }); // Make "All" checked if all checkboxes are checked $('.check').on('ifChecked', function (event) { if ($('.check').filter(':checked').length == $('.check').length) { $('#check-all').iCheck('check'); } }); handling $('#check-all').on('ifUnchecked', ... is tricky though - it fires the other...

Avoid “ifChanged” event handler when setting checkbox via Javascript

javascript,jquery,icheck

You could create a variable ignoreChange and when subscribing to the event handler, checking whether that variable is true and if it is, then set it to false and stop the function. If it is not true, then you can execute your normal code. JS code: var ignoreChange = false;...

iCheck jQuery blocks custom script

jquery,onclick,icheck

iCheck registers custom events you can listen for. I put up a working example on jsbin, the main difference is this: $("#my_cb").on("ifChanged", hide_row_metod); There are two events: ifChecked and ifUnchecked. If you want to catch all changes to your checkbox, you need to either listen for both or simply listen...

iCheck on() method callback not working

javascript,jquery,jquery-callback,icheck

It looks like you didn't initialize the checkbox as an iCheck object. To do so, you will need to add something along the lines of: $('#follow_us').iCheck(); to your script before the iCheck callback will work. Check the documentation (linked above) for more info on options you can set at initialization....

check the checkboxes if it is not checked using icheck() in jquery

jquery,jquery-plugins,icheck

Why don't you just do this? if .group_select is a parent which contains all the checkboxes then you can do as below $('.group_select').find('input[type="checkbox"]').iCheck('check'); if .group_select is the common classname given to your checkbox you can just write as below: $('.group_select').iCheck('check'); ...

how to send an object to angular directive on a check-box

javascript,angularjs,angular-directive,icheck

You can pass the item to directive scope and access it inside the link function. Along with item you can also pass the onChangeEvent handler to the directive. Try this. JS angular.module('app').directive('bootstrapCheck', ['$timeout', '$parse', function ($timeout, $parse) { return { scope: { item: '=', onChangeEvent: '&' }, compile: function (element,...

jQuery i-Check plugin same class name - retrieving two different values

javascript,jquery,icheck

If you leave a space between the id and the element name which in this case is input, the browser thinks that the input element is a descendant of the id element; so I think it's better to leave out spaces between those two. More info about ID selectors. Below...

How to enable/disable bootstrap selectpicker by ickeck checkbox

jquery,bootstrap-select,icheck

You should refresh the selectpicker once the change is done here is a working fiddle Code to refresh the UI is $('.selectpicker').selectpicker('refresh'); for more information refer the DOCS One more mistake i have found is, to disable you have to use attr('disabled',true) not attr('disabled') ...

capturing events from input/checkbox

javascript,jquery,icheck

Here is how your markup and code should look like for the plugin to work. iCheck has to be initialized before it can be used. ....... <script src="path-to/jquery"></script> <script src="path-to/icheck.js"></script> <script> $(function() { $('input').iCheck(); //minimum initialization $('input').on('ifChecked', function(event){ alert(event.type + ' callback'); }); $('input').on('ifUnchecked', function(event){ alert(event.type + ' callback'); });...

How to Check if all Check-boxes are Unchecked with jQuery icheck plugin.

jquery,icheck

http://jsfiddle.net/koa58o4o/10/ $('.select-users').on('ifUnchecked', function (event) { //counts the number of selected check-boxes // if count=0 hide div if ($('.select-users:checked').size() == 0) $('.block').hide(); }); ...

Using iCheck - event called twice on mobiles

angularjs,events,checkbox,icheck

Give this one a try https://jsfiddle.net/scdmuout/ I added in the below to stop it firing on the touch and click event.preventDefault(); event.stopPropagation(); ...

Function on radio button click not firing

javascript,jquery,html,icheck

The hint here is in the rendered HTML tag... <ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; border: 0px; opacity: 0; cursor: pointer; background: rgb(255, 255, 255);"></ins> The inputs are being managed by the iCheck plugin, which catches the 'click'...