Created
May 3, 2018 12:26
-
-
Save suresh-kumara-gist/46c05e419e241c236fd2022252d68ef2 to your computer and use it in GitHub Desktop.
checkbox all true
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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