Javascript 关闭颜色框并从父级导航到其他页面
下面是我正在做的,从colobox创建一个链接,关闭颜色后,我想从我现在所在的页面导航到其他页面,因此下面的代码关闭colobox,但它不会导航到其他页面Javascript 关闭颜色框并从父级导航到其他页面,javascript,jquery,Javascript,Jquery,下面是我正在做的,从colobox创建一个链接,关闭颜色后,我想从我现在所在的页面导航到其他页面,因此下面的代码关闭colobox,但它不会导航到其他页面 $(document).ready(function(e) { $(".editquotelinenow").click(function(e) { var id = $(this).attr('id'); var mainID = $(this).attr('data-id'); wi
$(document).ready(function(e) {
$(".editquotelinenow").click(function(e) {
var id = $(this).attr('id');
var mainID = $(this).attr('data-id');
window.parent.$.colorbox.close();
window.location.href='index.cfm?action=linkproducts&ID='+mainID+'&ibase='+id+'&icode=sync';
});
});
我不确定我做错了什么,甚至我已经将父对象移到了窗口下方。位置但没有效果
我还尝试添加了
window.parent.location.href=
,但也不起作用,我在这里遗漏了一些愚蠢的东西,不确定是什么,请指导使用window.parent的目的是什么以及什么是colorbox?下面的代码工作正常
$(document).ready(function() {
$(".editquotelinenow").click(function() {
var id = $(this).attr('id');
var mainID = $(this).attr('data-id');
window.location.replace('index.cfm?action=linkproducts&ID='+mainID+'&ibase='+id+'&icode=sync');
});
});
colorbox就像fancybox的替代品