I am trying to implement the following code but the value returned to the id on page is populated with the NaN (Not a Number) error. Has anyone got any suggestions what I can do here? I have been battling this for over an hour now, so your assistance would be appreciated.
setInterval( function(){
var b = $('input#ien_val').val();
var ien;
for (ien = 0; ien < b; ien++) {
var encuser = parseInt($('#enutt'+ien).html());
var enteam = parseInt($('#enttotalday'+ien).html());
var enoffset = (encuser/enteam)*100;
$('#tten' + ien).html(enoffset + '%');
}
},2000);
As per comments below I have added an example of my issue here http://jsbin.com/tobilonepu/1/