MutationObserver
if ("MutationObserver" in window) { // Check if the browser support MutationObserver
var observer = new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
// Desvinculo el evento mouseover para que lo mensajes de error no se oculten al pasarle el mouse al elemento
console.log(mutation.type);
console.log(mutation.addedNodes);
jQuery('span.wpcf7-not-valid-tip').unbind('mouseover');
jQuery('.wpcf7-form input, .wpcf7-form textarea').unbind('mouseover');
});
});
// Notify me of everything!
var observerConfig = {
attributes: true,
childList: true,
characterData: true
};
// Node, config
// In this case we'll listen to all changes to body and child nodes
var targetNode = document.body;
observer.observe(targetNode, observerConfig);
}