jQuery .on()

jQuery .on()

1 예시[ | ]

<button id='button-add'>버튼 추가</button>

<script src="//code.jquery.com/jquery.min.js"></script>
<script>
$('#button-add').click(function() {
  $('body').append("<button class='new-button'>새 버튼</button>");
});
$(document).on('click', '.new-button', function() {
  $(this).remove();
});
</script>

2 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}