1const ShowWhenCheckedBinder = (function () { 2 3 const selector = '[show-when-is-checked]'; 4 5 function Bind() { 6 let items = GetIsCheckedItems(); 7 $(items).each(function () { 8 let item = $(this); 9 let checkId = GetCheckId(item); 10 if (checkId == '') 11 return; 12 13 $(checkId).each(function () { 14 $(this).on('change', function () { 15 if ($(this).is(':checked')) 16 item.slideDown(); 17 else 18 item.slideUp(); 19 }); 20 21 if ($(this).is(':checked')) 22 item.show(); 23 else 24 item.hide(); 25 }); 26 }); 27 } 28 29 function GetIsCheckedItems() { 30 return $(selector); 31 } 32 function GetCheckId(item) { 33 return $(item).attr('show-when-is-checked') || ''; 34 } 35 36 return { 37 Bind: Bind 38 } 39 40})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.