Added some missing type checks.
This commit is contained in:
parent
b23c03c190
commit
b62542f74c
|
@ -117,7 +117,7 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
element.attr('selected','selected');
|
element.attr('selected','selected');
|
||||||
if(settings.oncheck){
|
if(typeof settings.oncheck === 'function'){
|
||||||
if(settings.oncheck(value)===false){
|
if(settings.oncheck(value)===false){
|
||||||
$(this).attr('checked', false);
|
$(this).attr('checked', false);
|
||||||
return;
|
return;
|
||||||
|
@ -128,7 +128,7 @@
|
||||||
}else{
|
}else{
|
||||||
var index=settings.checked.indexOf(value);
|
var index=settings.checked.indexOf(value);
|
||||||
element.attr('selected',null);
|
element.attr('selected',null);
|
||||||
if(settings.onuncheck){
|
if(typeof settings.onuncheck === 'function'){
|
||||||
if(settings.onuncheck(value)===false){
|
if(settings.onuncheck(value)===false){
|
||||||
$(this).attr('checked',true);
|
$(this).attr('checked',true);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue