Hi,
I have 2 close buttons in my colorbox, 1 is the default close button (the X button) and the other is the one I created. I need to know which button I clicked in the onCleanUp event of colorbox. Both of the button can close the colorbox but I need to do something if the button which I created is the one that is clicked.
$(".openBox").colorbox({ width: "350px", height: "350px, inline: true, href: "#ModalBox",
onCleanup: function() {
// I want to know here which close button I clicked.
// So I can save the text inside the textarea.
// and ignore it if the default close button is clicked.
}
});
ModalBox looks like this.
<div style="display: none;">
<div id="ModalBox">
<textarea name="txtInput"></textarea>
<button onclick="$.fn.colorbox.close();return false;">Save</button>
</div>
</div>