I have two tables and I want to have change event on one table. That is when I click on first table, I want to have some changes to the second table. But somehow below change function is not working. Any suggestions?
$("#history_table table:eq(0)").click(function(){
$("#history_table table:eq(1) thead tr th:nth-child(1)").html("New");
});
$("#history_table table:eq(1) thead tr th:nth-child(1)").change(function() {
alert('Handler for .change() called.');
});
Here history_table is a div tag id and it has two tables. click() function is working but I am expecting to see alert message as well, but this is not showing.