I want to trigger Colorbox event on clicking Close button and overlay close but it's not working:
$('#cboxClose').on('click', function() {
alert("Click button");
});
$("cboxOverlay").on('click', function() {
alert("Click overlay");
});
Use colorbox onClosed callback. See documentation: http://www.jacklmoore.com/colorbox/
$(".popuplink").colorbox({
href: popupurl,
close: "Close",
overlayClose: true,
onComplete: function () {
alert("Completed");
},
onClosed: function () {
alert("Closed");
}
});