최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday

티스토리 뷰

.on()

 

Attach an event handler function for one or more events to the selected elements.

 

.on( events [, selector ] [, data ], handler(eventObject) )

 

example)

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

$("#dataTable tbody").on("click", "tr", function(event){
alert($(this).text());
}); 
댓글