dd手风琴不工作。控制台中没有显示错误

时间:2016-10-13 16:07:05

标签: javascript jquery html

我在网站上设置了ddacordion,但由于某种原因它无法正常工作。它一直保持开放状态。 我已经检查过正在调用的库是否正确,我看到控制台中没有记录错误。

我已经使用网站上使用的确切的html,css和脚本设置了一个小提琴,它在那里不起作用,它排除了与其他javascript或jquery的冲突。 小提琴可以在https://jsfiddle.net/b1ao7g05/2/

找到

使用的脚本来自ddaccordion网站上的演示,是

ddaccordion.init({
headerclass: "submenuheader", //Shared CSS class name of headers group
contentclass: "submenu", //Shared CSS class name of contents group
revealtype: "mouseover", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
collapseprev: true, //Collapse previous content (so only one open at any time)? true/false 
defaultexpanded: [], //index of content(s) open by default [index1, index2, etc] [] denotes no content
onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
animatedefault: false, //Should contents open by default be animated into view?
persiststate: true, //persist state of opened contents within browser session?
toggleclass: ["", ""], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
togglehtml: ["suffix", "<img src='plus.gif' class='statusicon' />", "<img src='minus.gif' class='statusicon' />"], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
    //do nothing
},
onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
    //do nothing
}
})

是什么原因导致手风琴失败?

1 个答案:

答案 0 :(得分:-1)

ReferenceError:未定义ddaccordion

  1. Zencart不支持https。即使链接更改为https,它也不会起作用。引用错误仍然存​​在,因为内容不会通过untrustet证书加载
  2. 脚本正在使用document.write(当我将ddaccordianscript复制到小提琴JS-Area时显示)
  3. 确保&#34;基础设施&#34;问题在提交之前有效,以便用户可以帮助您找到代码中的错误,而不是jsfiddle的问题。