jquery dynamic event code example
Example: change event doesn't work on dynamically generated elements .
$( "#dataTable tbody" ).on( "click", "tr",
function() {
console.log( $( this ).text() );
});
$( "#dataTable tbody" ).on( "click", "tr",
function() {
console.log( $( this ).text() );
});