티스토리 뷰

Working log

20190328002 - modal, popover 이벤트 처리

까오기 까오기 2019. 3. 28. 14:42
<script>
$('.popoverEvent').on('show.bs.popover', function () {
  setTimeout(function () {
  $('.popoverEvent').popover('hide');
  }, 2000);
})

$('.popoverEvent').on('hidden.bs.popover', function () {
  // do something…
})

$('.modalEvent').on('show.bs.modal', function () {
  // do something…
})

$('.modalEvent').on('hidden.bs.modal', function () {
  // do something…
})
</script>
<button type="button" class="btn btn-secondary col-lg-4 popoverEvent" 
	data-container="body" data-toggle="popover" data-popover-color="default" data-placement="top" title="이번달"
	data-content="해당월의 1일부터 전 영업일까지로 날짜를 설정합니다." 
	@click="setThisMonth()"><i class="icon ion-calendar mg-r-5"></i>이번달</button>

popover, modal 관련 이벤트 

Modal Events

Event Description
show.bs.modal Occurs when the modal is about to be shown
shown.bs.modal Occurs when the modal is fully shown (after CSS transitions have completed)
hide.bs.modal Occurs when the modal is about to be hidden
hidden.bs.modal Occurs when the modal is fully hidden (after CSS transitions have completed)

 

댓글
댓글쓰기 폼