Hello,
I created panel that contain many checkbox, radio.
I would like to disable / enable all checkbox in panel by extend panel method.
I apply a code from this topic
https://www.jeasyui.com/forum/index.php?topic=3038.0 but it does'n work.
Here is modified code
$.extend($.fn.panel.methods, {
enableCbx: function(jq) {
return jq.each(function() {
var t = $(this);
t.find('input')._propAttr('enabled', 'enabled');
var plugins = ['checkbox', 'radiobutton'];
for (var i = 0; i < plugins.length; i++) {
var plugin = plugins[i];
var r = t.find('.' + plugin + '-f');
if (r.length && r[plugin]) {
r[plugin]('enable');
}
}
})
},
disableCbx: function(jq) {
return jq.each(function() {
var t = $(this);
t.find('input')._propAttr('disabled', 'disabled');
var plugins = ['checkbox', 'radiobutton'];
for (var i = 0; i < plugins.length; i++) {
var plugin = plugins[i];
var r = t.find('.' + plugin + '-f');
if (r.length && r[plugin]) {
r[plugin]('disable');
}
}
})
}
})
Could your please advice where I missing? Thank you.