我需要在用户点击Fancybox内的链接时关闭Fancybox。
我已经尝试过: href="javascript:$j.fn.fancybox.close();" (注意,我正在使用jQuery并且没有冲突,因此是$j)
当我尝试时,它不起作用,并且在Firebug中出现一个错误,其中显示“$j.fn.fancybox.close不是一个函数”。
请注意:我正在使用Fancybox版本1.3.4
以下是Fancybox的脚本:
有什么办法可以使这个正常工作?
我已经尝试过: href="javascript:$j.fn.fancybox.close();" (注意,我正在使用jQuery并且没有冲突,因此是$j)
当我尝试时,它不起作用,并且在Firebug中出现一个错误,其中显示“$j.fn.fancybox.close不是一个函数”。
请注意:我正在使用Fancybox版本1.3.4
以下是Fancybox的脚本:
<script type="text/javascript" >
var $j = jQuery.noConflict();
$j(document).ready(function(){
$j("#start").fancybox({
'padding' : 0
});
</script>
Fancybox的HTML代码:
<div class="hide">
<img src="/Images/skin/spacer1x1.png" onload="$j('#start').trigger('click');" />
<a href="#welcome" id="start"></a>
<img style="width:700px; height:600px;" id="welcome" usemap="#Map" alt="PLEASE VIEW PAGE WITH IMAGES ON" src="/Images/start/start.png" />
<map id="Map" name="Map">
<area alt="See Message Examples" href="/artistphotos/" coords="29,431,301,465" shape="rect" />
<area alt="Enter Site" href="javascript:$j.fn.fancybox.close();" coords="436,433,567,464" shape="rect" />
</map>
</div>
有什么办法可以使这个正常工作?