I have a checkbox item like this:
$("#userRoleDiv-"+note_id).append(" \n\ <div><input name='userInput-"+note_id+"' type='checkbox' value='' id= '1' />Instructor</div>\n\ <div><input name='userInput-"+note_id+"' type='checkbox' value='' id= '2' />Students</div>\n\ "); Now, I want to check checkboxes having id 1 and/or 2 but has the same name, as given in the code. How can it be done?