When you start the loop, the elements are already identified, and it will loop through those elements, so the new element that appears it won't detect.
So just repeat the loop, new elements will be detected (if you have defined the correct Element selector )