views:

14

answers:

0

This is how I instantiated the modal, with 'btnModalAddGroup' as the div that acts as a button:

<div id="btnModalAddGroup" class="button">Add New Group</div>

$('#btnModalAddGroup').click(function() {
    $("#addGroupModal").modal({
        appendTo: 'form',
        escClose: false,
        persist: true, 
        onOpen: function(dialog) {
            dialog.overlay.fadeIn('fast');
            dialog.container.fadeIn('fast');
            dialog.data.fadeIn('fast');
        },
        onClose: function(dialog) {
            dialog.overlay.fadeOut('fast');
            dialog.container.fadeOut('fast');
            dialog.data.fadeOut('fast');
        }
    });
}
);

This is the cancel button:

<div id="btnCancelAddGroup" class="button simplemodal-close">Cancel</div>

Everything works fine but once I close the modal, I can't open it again by clicking the Add New Group button. Anything I missed? Does anybody encounter this issue as well?