For some reason it's just not running the onComplete function.  It does however load the fancybox div.   My html:
<ul>
    <li class="orange">
           #1 <a href="#text">click here</a>
           <div id="text" class="text">text text text</div>
    </li>
</ul>
My jquery:
 jQuery('li a').fancybox({       
    'autoDimensions':   'false',
    'width' :   631,
    'height':   256,        
    'onComplete':function(){
        alert('running');
        jQuery('.fancybox-skin').css('background-color',colour);
    }
});
the alert doesn't run.  I've also tried changing the event function to onClosed and the other events, and nothing.
I guess you forgot to specify what version of fancybox you are using.
onComplete is a callback option for fancybox v1.3.x while the fancybox-skin class was introduced until version 2.x, ..... so I assume that you are using version 2.x, aren't you?
Fancybox v2.x options are new and not compatible with previous versions; the equivalent for the onComplete (v1.3.x) option is now the afterLoad (v2.x) callback option.
Check http://fancyapps.com/fancybox/#docs for the complete list of options, methods and callbacks for fancybox v2.x
afterShow I think is the proper equivalent to onComplete in Fabxybox 2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With