Can we Make a checkboxList using jquery like we fill the options in select tag of html?
- by SAHIL SINGLA
Can we Make a checkboxList using jquery like we fill the options in select tag of html?
I am confused how to make a checkboxlist using Jquery in Html?
I have seen Method for creating option tag in select tag of HTML But I dont know how to create a checkbox list?
$.fn.fillSelect = function(data) {
return this.clearSelect().each(function() {
if (this.tagName == 'SELECT') {
var dropdownList = this;
$.each(data, function(index, optionData) {
var option = new Option(optionData.Text, optionData.Value);
if ($.browser.msie) {
dropdownList.add(option);
}
else {
dropdownList.add(option, null);
}
});
}
});
}
any link of article that contains little bit this type?