0

I am working on a firestore web app. where I am adding new raw in table with

$("table").append(row);.

I have following function which is not working with new added raw. (Working with old raw without any problem).

$(document).ready(function() {
     $("#mytable td").click(function(event) {
    alert($(this).text());
   $(this).html('y');
        }); 
 });
Dhruv Shah
  • 193
  • 1
  • 1
  • 6

1 Answers1

1

would you please try following.

$(document).ready(function() {
     $(document).on("click","#mytable td",function(event) {
         alert($(this).text());
         $(this).html('y');
     }); 
 });
Obaidul Kader
  • 217
  • 1
  • 7