Failed to execute 'observe' on 'MutationObserver': The options object must set at least one of 'attributes', 'characterData', or 'childList' to true. at Object.setupChangeListeners (jquery.sticky.js:209) code example
Example: mutationobserver js
var targetNode = document.getElementById('myID');
var config = { attributes: true };
var observer = new MutationObserver(function (mutations) {
for (let mutation of mutations) {
if (targetNode.style.visibility == 'visible') {
document.getElementById('myID1').style.display = 'block';
document.getElementById('myID2').style.display = 'block';
}
else {
document.getElementById('myID1').style.display = 'none';
document.getElementById('myID2').style.display = 'none';
}
}
});
observer.observe(targetNode, config);