1$( "#dataTable tbody tr" ).on( "click", function() {
2 console.log( $( this ).text() );
3});
4
1// There are quite a few abstracted versions of the following
2$('element').on('event', function() {
3 // Do something
4});
5
6// Where 'event' is something such as 'click', 'hover' etc
7
8// They are abstracted as seen below
9$('element').click(function(){
10 // Do something
11});
12$('element').hover(function(){
13 // Do something
14});
15
16// etc...
1$( "#target" ).click(function() {
2 alert( "Handler for .click() called." );
3});
4