Search code examples
jqueryfancybox

Fancybox not working in IE8 - method "onCleanup" not supported


So I'm testing out fancybox. Working with this simple example (which is defined inside body:

<link rel="stylesheet" href="../../Content/Scripts/fancybox/jquery.fancybox-1.3.4.css"
type="text/css"/>
<script type="text/javascript" src="../../Content/Scripts/fancybox/jquery.fancybox-1.3.4.js"></script>
<script type="text/javascript" src="../../Content/Scripts/fancybox/jquery.easing-1.3.pack.js"></script>

<script type="text/javascript">
function ShowModal() {
    $.fancybox('<h2>test</h2><p>asdf</p>', {
        'transitionIn': 'fade',
        'transitionOut': 'fade'
    });
}
</script>

I call the ShowModal function elsewhere, and also have jquery referenced in head.

This works fine in both Firefox and Chrome - but in IE8 I get a js error on line 324 - possibly related to the "onCleanup" method.

I chrome I had this error earlier: Uncaught TypeError: Object # has no method 'onCleanup'

Which I assumed was the same error IE was complaining about, I double-checked some script paths and the error went away in Chrome, but IE still complains - can anyone help me?


Solution

  • It was of course because my link tag isn't in the head - I seriously gotta stop thinking zebra, just cause I see stripes.