让onLoad Fancybox工作得很好......但我想重定向或在单击图像或关闭按钮时打开_blank页面。
以下是我到目前为止...... http://cumberlandhorizons.com/box-test3.html
想要链接到这里...... http://cumberlandhorizons.com/box-end.html
以下是box-test.html页面的代码...
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title> - Fancybox Test 03</title>
<script type='text/javascript' src='http://code.jquery.com/jquery-1.8.3.js'></script>
<script type='text/javascript' src="source/jquery.fancybox.js"></script>
<link rel="stylesheet" type="text/css" href="source/jquery.fancybox.css">
<script type='text/javascript'>//<![CDATA[
$(function(){
jQuery(document).ready(function ($) {
$("#hidden_link").fancybox({
onComplete: function () {
$("#fancybox-img").wrap($("<a http://cumberlandhorizons.com/>", {
href: this.href, //or your target link
target: "_blank"
}));
}
}).trigger("click");
});//]]>
</script>
</head>
<body>
<a id="hidden_link" href=" http://cumberlandhorizons.com/img/00subs.jpg" style="visibility:hidden;"></a>
</body>
</html>