手风琴停止工作,不会崩溃或展开

时间:2014-02-21 08:01:44

标签: javascript html accordion

这是我在Stackoverflow上的第一篇文章,我已经阅读了很长一段时间内的问题答案,现在需要提问。

我已经看了好几个小时,但找不到什么错。它是一个会议程序,使用 Joomla 制作。 javascript进入 index.php ,下面的程序代码在文章中。

// ]]>

  // BEGIN: ACCORDION FOR PROGRAM //

// <![CDATA[
//list of target elements
var list = $$('#accordion .content');
//list elements to be clicked on
var headings = $$('#accordion .speaker');
//array to store all of the collapsibles
var collapsibles = new Array();
headings.each(function(heading, i) {
  //for each element create a slide effect
  var collapsible = new Fx.Slide(list[i], {
    duration: 500,
    transition: Fx.Transitions.linear
  });
  //and store it in the array
  collapsibles[i] = collapsible;
  //add event listener
  heading.onclick = function() {
    //open current element
    collapsible.toggle();
    //hide the rest
    for (var j = 0; j < collapsibles.length; j++) {
      if (j != i) collapsibles[j].slideOut();
    }
    return false;
  }
  //collapse all of the list items
  collapsible.hide();
});
//collapse all
$('collapse-all').onclick = function() {
  headings.each(function(heading, i) {
    collapsibles[i].hide();
  });
}
//expand all
$('expand-all').onclick = function() {
  headings.each(function(heading, i) {
    collapsibles[i].show();
  });
}
// ]]>
// END: ACCORDION FOR PROGRAM // 

以下是我遇到问题的accoridon计划的链接:http://www.tbliconference.com/index.php/upcoming-conferences/tbli-usa-2014#rt-showcase-panel

它一直很好,直到现在,但似乎不再打开或关闭? 任何建议欢迎。

感谢您的帮助

斯蒂芬

0 个答案:

没有答案
相关问题