모달창을 닫을때 config.animateTime 만큼에 딜레이가 있게됩니다.
이 때문에 modal.close 후에 바로 modal.open을 하게 되면 제대로 작동하지 않는 문제가 있습니다.
이런 문제를 해결 하기 위해 close 메서드에 callback 전달 하는 방법을 사용합니다.
<script type="text/javascript">
var modal = new ax5.ui.modal();
$(document.body).ready(function () {
$('#modal-open').click(function () {
modal.open({}, function () {
// check your browser console
console.log(this);
var btn1 = jQuery('<button class="btn btn-default" type="button" style="margin-top: 100px;">Close</button>');
var btn2 = jQuery('<button class="btn btn-default" type="button" style="margin-top: 100px;">Close & Open</button>');
btn1.click(function () {
modal.close();
});
btn2.click(function () {
modal.close({
callback: function () {
modal.open();
}
});
});
this.$["body-frame"]
.append(btn1)
.append(btn2);
});
});
});
</script>
'AX5UI' can be used with Bootstrap theme. The development of the distribution of the various UI plug-in. When you click the link to move to AX5UI index page.
AXBoot makes it easy to build web applications with Java & HTML5 Repeatable and noise development process are resolved by AXBoot.