Hello, good morning.
I need to compare a change in the DIV1 daughters so I can make a notification. This way I did may not be the best, I'm still learning.
<div class="div1">
<div class="filha">
<div class="filha">
<div class="filha"> assim que adicionado o Js precisa ter como saber </div>
<div class="filha"> se retirado tbm precisa saber </div>
</div>
var myFunction4 = function() {
jQuery(".div1").load(" meusite/minhaurl .div1");
};
var myFunction5 = function() {
filhas = jQuery(".div1 .filha").length;
//console.log(filhas);
};
setInterval(myFunction4, 10000);
setInterval(myFunction5, 10000);
Function 5 can know exactly the number of child elements in the parent (once added or removed). But how to know how many before?
To be able to compare and be able to notify? Is this the right form?
Is there a better one? Hugs