Fancybox on page load error-Collection of common programming errors

This is driving me crazy

Uncaught TypeError: Object # has no method 'onCleanup'

Here’s my header code:



    Artworking



        
        
        
    
          
       
    
     
    
    
    
        
        // Load everything up    
        $(document).ready(function() {

        $.fancybox(    
            '

Hi!


Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam quis mi eu elit tempor facilisis id et neque', { 'autoDimensions' : false, 'width' : 350, 'height' : 'auto', 'transitionIn' : 'none', 'transitionOut' : 'none' } ); });

I've moved the fancy folder from root to root/js so it exists in /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

.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

  1. 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? i.e.

    
    
    

    Let me know if this works. Otherwise, have you tried running it under Firefox with the Firebug debugger. You can set it to breakpoint on errors and do some inspection of the code and the current state of variables at this point?