티스토리 뷰
.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());
});
'■ 프론트엔드 ■ > jQuery' 카테고리의 다른 글
| 모바일웹에서 버튼을 길게 눌렀을때 뜨는 이미지저장 (context menu)막기 (0) | 2013.10.13 |
|---|---|
| css 백그라운드 바꾸기 (0) | 2013.10.13 |
| .offset() - 좌표찾기, 좌표셋팅 (0) | 2013.10.13 |
| .val() - 체크박스, 인풋박스 값가져오기 (0) | 2013.10.13 |
| .animate - 딜레이와 움직임 (0) | 2013.10.13 |
댓글