title: jquery functions after append row to table
body: <p>I need some help so I hope you could help me. I have a table which rows are added this way after click on a button.</p>
  
  <pre><code>var row = "&lt;tr&gt;&lt;td&gt;&lt;input class='check_box' type='checkbox'&gt;&lt;/input&gt;some text&lt;td&gt;&lt;/tr&gt;";
  
  $('#pl_table').append(row);
  </code></pre>
  
  <p>I also have jquery function that adds a class to a row when checkbox is selected. So this class has a .css definition for background color.</p>
  
  <pre><code>$('input:checkbox').on('change', function() { 
      if(this.checked) {
          $(this).closest('tr').addClass('selected');
      }
      else{
          $(this).closest('tr').removeClass('selected');
      }
  }
  </code></pre>
  
  <p>The problem is <code>on('change')</code> event is not called for rows added. And it is called for rows that already exist when loading the page.</p>
  
  <p>why does this happend? What is wrong on my code? Thank you for your help.</p>