I want to use for loop to create jquery function, but when I add the array parameter in the string, it didn't work. Any suggestion?
var ids=["width_uncheck","thickness_uncheck"];
var names=['width','thickness'];
for(i=0;i<2;i++){
$("#"+ids[i] ).click(function() {
$('input:radio[name='+names[i]+']').each(function(i) {
this.checked = false;
});
});
}