"document.body is null" is fixed now I get ".setStyle is not a function"
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.
精彩评论