1var targetNode = document.getElementById('myID');
2var config = { attributes: true };
3var observer = new MutationObserver(function (mutations) {
4 for (let mutation of mutations) {
5 if (targetNode.style.visibility == 'visible') {
6 document.getElementById('myID1').style.display = 'block';
7 document.getElementById('myID2').style.display = 'block';
8 }
9 else {
10 document.getElementById('myID1').style.display = 'none';
11 document.getElementById('myID2').style.display = 'none';
12 }
13 }
14});
15
16observer.observe(targetNode, config);