Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / Languages / Javascript

Checkbox List With Filtering jQuery Widget

5.00/5 (1 vote)
6 Jun 2013CPOL 11.9K  
This is an alternative for Checkbox List With Filtering jQuery Widget

Introduction

The following modifications are about making the widget work correctly in jQuery 10+ versions.  I found that in jQuery 10.10.1, the Check All functionality didn't work.

Using the code 

The only code modifications that I made were in the jquery.ui.checkList.js file, the only thing that I changed was: 

JavaScript
var chkAll = $('<input/>').attr('type','checkbox').addClass('chkAll').click(function(){
    var state = $(this).attr('checked');
    var setState = false;
				
    setState = (state==undefined) ? false : true;

    o.objTable.find('.chk:visible').attr('checked', setState);

    self._selChange();
});  

by this: 

JavaScript
var chkAll = $('<input/>').attr('type','checkbox').addClass('chkAll').click(function(){
				
    var state = $(this).prop('checked');
    o.objTable.find('.chk:visible').attr('checked', state);
    self._selChange();
				
});  

and now works!

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)