1 2 3 4 5 | var row = $(element).insertRow(1); var qty = row.insertCell(1); qty.innerHTML = productArr[i].qty; qty.id='qty_'+productArr[i].service_id; qty.addEvent("click",function() {mod(this) }); |
You actually have to nest your function call inside of function(){} and especially if you want to pass additional parameters into the function.
Related posts: