views:

67

answers:

1

Hi All, I'm running into a similar problem as this:

link text

I've done the fix as in the answer but now I end up with an error a couple lines later:

$$([overlay = (new Element("div", {id: "mbOverlay"})).addEvent("click", close), center = new Element("div", {id: "mbCenter"})]).setStyle is not a function [Break on this error] ]).setStyle("display", "none")

It's on this page:

link text

When you click on 'showreel' it should pop up into the media box, but instead it just goes to a new page.

Any help would be much appreciated. Thanks!

A: 

At some point $$([]) returns a NodeList, not a single element, and a NodeList has no setStyle method

$$([
    overlay = new Element("div", {id: "mbOverlay"})
        .addEvent("click", close),
    center = new Element("div", {id: "mbCenter"})
]).setStyle("display", "none");

I'm not certain why that is though... I'm not familiar with MooTools.

Sean Kinsey