$("#dataTable tbody").on("click", "tr", function(event){ alert($(this).text()); }); ///// function notify(){ alert("clicked"); } $("button").on("click", notify);