Im trying to add more feature in zabuto calendar. That is a modal will appear after click on date, allow we to add or remove event for this day. But i can't catch event click on the button in this modal. Here is my code.
function createModal() {
// create a modal
//...
var $modalFooterButtonSave = $('<button id="btnSave">Save</button>');
var $modalFooterButtonDelete = $('<button id="btnDelete">Delete</button>');
//...
//return this modal
}
function myDateFunction() {
//Add modal into html page
$("#myModal").html(createModal());
//Show modal
$('#adjustModal').modal('show');
return true;
}
$(document).ready(function () {
// zabuto event click on date
$("#my-calendar").zabuto_calendar({
action: function () {
return myDateFunction();
}
});
//Here is problem, i can't catch the event click on this button.
$("#btnSave").click(function(){
alert("The btn Save was clicked.");
});
}