currently, i am using the following to close a dialog
<button onClick="Boxy.get(this).hideAndUnload(); return false;">Cancel</button>
but i want to do something like
<button class="btnCancel">Cancel</button>
to close the dialog
i tried to use jquery delegate()
to close the dialog but it does not work. fyi, i am loading the whole form dynamically using ajax. eg.
$.get("add/text.html", function(data) {
var b = new Boxy(data, {
title: "Add Text Post",
modal: true,
});
$.getScript("js/tinymce.config.js");
b.show();
})