简体   繁体   English

Fancybox页面加载错误

[英]Fancybox on page load error

This is driving me crazy 这真让我抓狂

Uncaught TypeError: Object #<an Object> has no method 'onCleanup'

Here's my header code: 这是我的标头代码:

<head id="ctl00_Head1"><title>

    Artworking

</title>

    <link rel="stylesheet" type="text/css" href="css/default.css?v=1" />    
    <link rel="stylesheet" type="text/css" href="css/jgrowl.css?v=1" />    
    <script type="text/javascript" src="js/jquery1.4.4.js"></script>    
    <script type="text/javascript" src="js/jgrowl.js"></script>
    <link rel="stylesheet" type="text/css" href="css/artworkDesigner.css?v=1" />      
    <link href="js/uploadify-2.1.4/uploadify.css?v=1" type="text/css" rel="stylesheet" />   
    <script type="text/javascript" src="js/uploadify-2.1.4/swfobject.js"></script>
    <script type="text/javascript" src="js/uploadify-2.1.4/jquery.uploadify.v2.1.4.min.js"></script> 
    <script type="text/javascript" src="js/fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
    <script type="text/javascript" src="js/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
    <link rel="stylesheet" type="text/css" href="js/fancybox/jquery.fancybox-1.3.4.css?v=1" media="screen" />
    <script type="text/javascript">    
        // Load everything up    
        $(document).ready(function() {

        $.fancybox(    
            '<h2>Hi!</h2><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam quis mi eu elit tempor facilisis id et neque</p>',    
            {    
                'autoDimensions'    : false,    
                'width'                 : 350,    
                'height'                : 'auto',    
                'transitionIn'      : 'none',    
                'transitionOut'     : 'none'   
            }    
        );

        });          
    </script>
</head>

I've moved the fancy folder from root to root/js so it exists in /js/fancybox/ . 我已经将fancy文件夹从root移到了root/js所以它存在于/js/fancybox/ I've checked the references to the JS/CSS files, and they are all linked fine, I've also changed the relevant links in the CSS file to reference js/, IE 我检查了对JS / CSS文件的引用,它们都很好地链接了,我还更改了CSS文件中的相关链接,以引用js /,IE。

.fancybox-ie #fancybox-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_n.png', sizingMethod='scale'); }

Now equals 现在等于

.fancybox-ie #fancybox-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='js/fancybox/fancy_shadow_n.png', sizingMethod='scale'); }

But no luck :0 但没有运气:0

I don't know if it will solve the problem, but could you try moving the declaration of the mousewheel script after the one for the fancybox script? 我不知道它是否可以解决问题,但是您可以尝试将fancybox脚本的声明后的mousewheel脚本的声明移动吗? ie

<script type="text/javascript" src="js/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<script type="text/javascript" src="js/fancybox/jquery.mousewheel-3.0.4.pack.js"></script>

Let me know if this works. 让我知道这个是否奏效。 Otherwise, have you tried running it under Firefox with the Firebug debugger. 否则,您是否尝试过使用Firebug调试器在Firefox下运行它。 You can set it to breakpoint on errors and do some inspection of the code and the current state of variables at this point? 您可以将其设置为出现错误的断点,并在此时检查代码和变量的当前状态?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM