×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Text
Posted by: Влад Якуб
Added: Oct 2, 2019 3:51 PM
Modified: Jul 15, 2020 12:01 PM
Views: 4055
Tags: no tags
  1. 'js' => '
  2.             var $collections = [
  3.                             $("[rnum=1], [rnum=2]", $(".pr-rows-group")),
  4.                     ];
  5.                         $($collections).each(function() {
  6.                                 var $collection = $(this);
  7.                                 $collection.find(":checkbox").on("change", function() {
  8.                                         var row = $(this).closest("[rnum]").attr("rnum"),
  9.                                             col = $(this).closest("[cnum]").attr("cnum"),
  10.                                             isChecked = $(this).prop("checked") || $("[cnum=" + col + "] [discol]:checked").length;
  11.                                         $collection.not("[rnum=" + row + "]").find("[cnum=" + col + "] :checkbox").prop("disabled", isChecked);
  12.                                 });
  13.                         });
  14.                 ',