javascript - Check checkboxes by value -
i have been using code comma separated list of checkboxes checked.
$(".hidfeedsids").val($.map($(':checkbox[name=channel\[\]]:checked'), function (n, i) { return n.value; }).join(','));
now need opposite, have list need check checkboxes values on it.
can tell me how done?
aside fact code isn't syntactically valid...
$('input:checkbox').filter(function() { return valuesarray.indexof(this.value) > -1 }).prop('checked', true);
Comments
Post a Comment