嗨我点击链接打开一个带有表单的颜色框我想要的是当我点击提交按钮时,表单将通过ajax并基于返回的数据提交
if(error on the server side){
the error will be displayed at the top of the form;
// colorbox still open
}else{
the returned data will be displayed on the original page;
close the colorbox;
}
所以除了使用此代码的关闭颜色框部分外,我做了所有这些:
$.colorbox.close();
这也不起作用:
parent.jQuery.colorbox.close();
任何帮助,而不是提前。
答案 0 :(得分:1)
过了一会儿,不记得它是什么......
试试这个......
$(window).colorbox.close();
或者这......
jQuery(window).colorbox.close();
或者这......
jQuery('#cboxClose').click();