title: Dynamically create table rows with onClick events
body: <p>I am generating a table and when I create the rows I have a for loop like this:</p>
  
  <pre><code> for (var i = 0 ; i &lt; myList.length ; i++) {
       var row$ = $('&lt;tr/&gt;');
       for (var colIndex = 0 ; colIndex &lt; columns.length ; colIndex++) {
           if (columns[colIndex] == 'web_id'){
            cellValue = "&lt;a onclick='showMoreData('myList[i][columns[colIndex]]')'&gt;" + myList[i][columns[colIndex]] + "&lt;/a&gt;"
           }
           else {
                var cellValue = myList[i][columns[colIndex]];
           }
  
           if (cellValue == null) { cellValue = ""; }
  
           row$.append($('&lt;td/&gt;').html(cellValue));
       }
       $(".table").append(row$);
  </code></pre>
  
  <p>but this isn't working, what do I need to do to add an onclick event based on the row's content in a column so that I can add a dynamic link?</p>