Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save suresh-kumara-gist/46c05e419e241c236fd2022252d68ef2 to your computer and use it in GitHub Desktop.
Save suresh-kumara-gist/46c05e419e241c236fd2022252d68ef2 to your computer and use it in GitHub Desktop.
checkbox all true
// get all ids of checkbox
var someObj={};
someObj.fruitsGranted=[];
someObj.fruitsDenied=[];
jQuery(“.js-rid-admin”).each(function() {
var $this = jQuery(this);
if($this.is("checked")){
someObj.fruitsGranted.push($this.attr("id"));
}else{
someObj.fruitsDenied.push($this.attr("id"));
}
});
").prop('checked', true);
jQuery("#edit-doc-admin-edit-own-comments").prop('checked', true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment