I can't figure out how to pass an argument by value in JavaScript to onClick-function. I have been trying with closure functions but it doesn't seem to work!! aah
...
for(var i=0; i<=15; i++){
blockNr++;
meal = getMealByCategory(category, i);
place.innerHTML += "<div class='container-fluid' name='blockName' id='blockName" +
blockNr + "' onClick='addPrice(meal, 20)'></div>"; //here, always the last meal is sent
var itemPlace = document.getElementById("blockName"+blockNr);
itemPlace.innerHTML = meal; //this works fine for all meals
}