Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $( document ).ready(function() {
- $('.checkbox').change(function() {
- if($(this).is(":checked")) {
- var current_group = $(this).attr("group");
- jQuery('.checkbox').each(function() {
- var currentElement = $(this);
- if(currentElement.attr("group") != current_group) {
- currentElement.prop("disabled", true);
- }
- });
- }
- if(!$(this).is(":checked")) {
- jQuery('.checkbox').each(function() {
- var currentElement = $(this);
- currentElement.prop("disabled", false);
- currentElement.prop("checked", false);
- });
- }
- });
- });
Add Comment
Please, Sign In to add comment