Click here to Skip to main content
15,885,278 members
Articles / Programming Languages / Javascript
Alternative
Tip/Trick

Checkbox List With Filtering jQuery Widget

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
6 Jun 2013CPOL 11.5K   2   2
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)


Written By
Uruguay Uruguay
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
QuestionCheckbox List With Filtering jQuery Widget Pin
Evren Yortuçboylu6-Jun-13 6:32
Evren Yortuçboylu6-Jun-13 6:32 
AnswerRe: Checkbox List With Filtering jQuery Widget Pin
Member 1058395412-Feb-14 19:17
Member 1058395412-Feb-14 19:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.