jQuery-Watch is a nice little plugin that monitors CSS, Attribute or Property changes in an element.
It uses the MutationObserver internally for modern browsers and uses setInterval() polling as a fallback for older browsers.
var element = document.getElementById("Notebox"); var observer = new MutationObserver(observerChanges); observer.observe(element, { attributes: true, subtree: opt.watchChildren, childList: opt.watchChildren, characterData: true }); /// when you're done observing observer.disconnect(); function observerChanges(mutationRecord, mutationObserver) { }
$("#btnChangeContent").click(function () { // assign text programmatically }); // watch the content $("#SomeContent").watch({ properties: "prop_innerHTML", watchChildren: true, callback: function (data, i) { alert('text changed' + data.vals[i]); } });
What are particle animations? Particle network animations in JavaScript typically involve creating visual representations of… Read More
BOOKING SOLUTIONS 202x This is my take on a subset of booking, appointment, PMS or… Read More
THE GOAL Create a system cron for WordPress, that is accessible and can be easily… Read More
2024, what's cooking? Slowly getting into the 2024 spirit. 3 projects coming to a close… Read More
Short look back at 2023 This has been a busy and interesting year. I am… Read More
Elementor Pro provides grid containers as an experimental feature. The options provided are limited, when… Read More