$(document).ready(function(){
$('#rest').colorbox();
$("#cboxClose").click(function(){ $.fn.colorbox.close(); });
var cboxClose = $.fn.colorbox.close;
$.fn.colorbox.close = function(){ if(confirm("Are you sure?")) { cboxClose(); } }
});
this code close my jquery colorbox when i confirm the dialog, but if i click on cancel (!confirm) its as closing
what im doing wrong?