JSFiddle - React, Tailwind, and code Playground
by Nicolas PUJOL
HTML
<tr id="fcp7504" role="row" class="odd">
<td class="cl" data-sort="7504"><img src="/images/cur_0.png" width="18px" height="18px"> MMXVI</td>
<td class="cl">0.00002016</td>
<td class="cl"><span class="countdown green" exp="00:00:00" fcp="7504">ready</span></td>
<td class="cl">
<input type="button" class="clGetFreeCoins" origin="Get free coins" value="Get free coins">
<input type="button" class="clFreecoinsDonate" onclick="popupFreecoinsDonate(7504,615,"MMXVI","MMXVI","0.00002016","86400")" origin="Donate" value="Donate">
</td>
</tr>
<tr id="fcp7504" role="row" class="odd">
<td class="cl" data-sort="7504"><img src="/images/cur_0.png" width="18px" height="18px"> MMXVI</td>
<td class="cl">0.00002016</td>
<td class="cl"><span class="countdown green" exp="00:00:00" fcp="7504">ready</span></td>
<td class="cl">
<input type="button" class="clGetFreeCoins" origin="Get free coins" value="Get free coins">
<input type="button" class="clFreecoinsDonate" onclick="popupFreecoinsDonate(7504,615,"MMXVI","MMXVI","0.00002016","86400")" origin="Donate" value="Donate">
</td>
</tr>
<tr id="fcp7504" role="row" class="odd">
<td class="cl" data-sort="7504"><img src="/images/cur_0.png" width="18px" height="18px"> MMXVI</td>
<td class="cl">0.00002016</td>
<td class="cl"><span class="countdown green" exp="00:00:00" fcp="7504">ready</span></td>
<td class="cl">
<input type="button" class="clGetFreeCoins" origin="Get free coins" value="Get free coins">
<input type="button" class="clFreecoinsDonate" onclick="popupFreecoinsDonate(7504,615,"MMXVI","MMXVI","0.00002016","86400")" origin="Donate" value="Donate">
</td>
</tr>
<div id="window_captcha">
</div>
</div>
JavaScript
var t = setInterval(function() {
var nb = 0;
$('#freecoins_table > tbody > tr:visible').each(function() {
if (!$('#window_captcha').is(':visible')) {
nb++;
var status = $(this).children(":nth-child(3)").text();
var amount = parseFloat($(this).children(":nth-child(2)").text());
if (status !== 'ready' || amount <= 0.001) {
$(this).hide();
}
} else {
clearInterval(t);
console.log('stop');
}
});
console.log('restant', nb)
}, 5000);