Possible Duplicate:
jquery on vs click methods
From API:
.on() : Attach an event handler function for one or more events to the selected elements.
Example code:
$("#dataTable tbody tr").on("click", function(event){
alert($(this).text());
});
We can just write something like:
$("#dataTable tbody tr").click(function() {
alert($this).text();
});
Why bother wrapping the event inside .on() ?
Thanks.