[英]“document.body is null” is fixed now I get “.setStyle is not a function”
我遇到了類似的問題:
我已經按照答案進行了修復,但是現在在幾行之后出現一個錯誤:
$$([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")
在此頁面上:
當您單擊“ showreel”時,它應該彈出到媒體框中,但它會轉到新頁面。
任何幫助將非常感激。 謝謝!
在某些時候$$([])
返回一個NodeList,而不是單個元素,並且NodeList沒有setStyle方法
$$([
overlay = new Element("div", {id: "mbOverlay"})
.addEvent("click", close),
center = new Element("div", {id: "mbCenter"})
]).setStyle("display", "none");
我不確定為什么會這樣...我對MooTools不熟悉。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.