title: Javascript/jquery .click() not triggering function
body: <p>I have a table where some functions are triggered upon clicks on a link in each row:</p>
  
  <p>The relevant part of the code is: </p>
  
  <pre><code>$('.my_table').inplacerowedit({
       url: myurl,
      });
  </code></pre>
  
  <p>in inplacerowedit.js file, I have:</p>
  
  <pre><code>(function($) {
      $.fn.inplacerowedit = function(options) {
          var ops = $.extend({}, $.fn.inplacerowedit.defaults, options);
          $(this).find(ops.editbuttonselector).on('click', function(e) {
      ... }
  
  ops.editbuttonselector = 'a.edit'
  </code></pre>
  
  <p>My table has an edit link each row and it's usually working fine. My problem is with new created rows.</p>
  
  <p>Here is how I'm creating a row and adding it to the table:</p>
  
  <pre><code>    new_row = null
  
      getNewRow = function() {
          if (new_row == null){
              new_row = $("&lt;tr&gt;");
              columns = {'name':'','type':'','value':'','edit':'','delete':''}
              for (var column in columns)
                  new_row.append( $("&lt;td&gt;").addClass(column).text(columns[column]));
              links = ['edit','delete']
              for (var i=0;i&lt;links.length;i++){
                  link = links[i]
                  a = $("&lt;a href='"+link+"' class='"+link+"'&gt;").text(link);
                  new_row.find("."+link).append(a)
              }
          }
          return new_row
      };
  
      $("#addRowAndEdit").click(function(e){
          e.preventDefault();
             var row = getNewRow();
             $(".my_table").append(row);
             new_record = $('.my_table tbody&gt;tr:last');
             new_record.find('a.edit').click(); //this is the line that is not working.
             ....
      }
  </code></pre>
  
  <p>UPDATE:</p>
  
  <p>If I do <code>new_record.find('a.edit').on('click', alert('ok'));</code>, the alert funcion works, but the other one is not called.</p>
  
  <p>Any ideas?
  Thanks</p>