JQuery on

一直记错jQuery on的用法

http://api.jquery.com/on/

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

  

posted @ 2014-10-17 13:22  午后微醺  阅读(122)  评论(0编辑  收藏  举报