开发者

"document.body is null" is fixed now I get ".setStyle is not a function"

开发者 https://www.devze.com 2022-12-30 18:49 出处:网络
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:

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!


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消