嗨,我有一个链接,当点击打开一个带有表单的颜色盒时,我希望当我单击提交按钮时,表单将通过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();任何帮助,都要提前感谢。
发布于 2012-12-12 23:36:35
有一段时间了,记不清是哪一个了。
试试这个。
$(window).colorbox.close();或者这个..。
jQuery(window).colorbox.close();或者这个..。
jQuery('#cboxClose').click();https://stackoverflow.com/questions/13843188
复制相似问题