Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function(){
- console.log('jquery is installed and running.');
- //creates an array of checkboxes
- let options = $('input[name="PotentialConsequence"]').toArray();
- //iterate through array and to confirm if checked
- $.each(options, function() {
- $(this).on('change', function() {
- for (let i=0; i<options.length; i++){
- if (options[i].checked == true){
- continue;
- }
- options[i].disabled = true;
- }
- });
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement