I am trying to make a little idle click game, but have a problem with my startIdle function.
I can't pass the id to which input progressbar that is needed to start counting.
I have one input field and one button foreach id from a obj.

```
function addRow(id) {
var div = document.createElement('div');
div.className = 'row';
div.innerHTML =
    '<div class="w3-blue" name="idle" id="'+id+'" style="height:24px;width:20%"></div>\
     <button onclick="startIdle('+id+')">Click me</button>';
document.getElementById('content').appendChild(div);
}

function startIdle(id) {
_counter = 1;
_timer = setInterval(function(){
    document.getElementById(id).style.width = (_counter + "%");
    _counter++;
    if(_counter > 100) clearInterval(_timer);
}, 100);
}

function createIdles(){
for (var key in money) {
    // skip loop if the property is from prototype
    if (!money.hasOwnProperty(key)) continue;
    var obj = money[key].id;
    addRow(obj)
}
}
createIdles()

```

this is the console.log I get:

> 
> Uncaught ReferenceError: startIdle is not defined at HTMLButtonElement.onclick
> 
> 
>