我有以下代码:
window.addEvent('domready', function(){var myBox = new BoxMenu({items: [['Card Info', 'item_1.png',function(){ window.location = "card"; }],]});});
此代码创建一个框菜单项,单击它会打开“卡片”窗口。没问题。
但我不希望用户离开主窗口,所以我决定使用 jQuery colorbox。
我需要知道如何调用调用颜色框脚本的 iframe 类以从该页面打开。
通常(仅在一页中)通过以下方式完成:
<script>
jQuery.noConflict();
(function($) {
$(document).ready(function(){
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
$("#click").click(function(){
$('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
return false;
});
});
})(jQuery);
</script>
then the HTML
<p><a class='iframe' href="reach.html">Outside Webpage (Iframe)</a></p>
但在这种情况下,框菜单就是链接本身。有人可以帮忙吗?
提前致谢