我是javascript的初学者,我从一个手风琴网站上获得了一个代码,我想改变滑块打开基本幻灯片的方式,而不是给出的动画。我有三个javascript文件,所以我不确定如何更改它,但头部的代码是
function init(){
var stretchers = document.getElementsByClassName('stretcher');
var toggles = document.getElementsByClassName('display');
var myAccordion = new fx.Accordion(
toggles, stretchers, {opacity: true, height: true, width: true, duration: 400, transition: fx.sineInOut});
//hash functions
var found = false;
toggles.each(function(h3, i){
var div = Element.find(h3, 'nextSibling');
if (window.location.href.indexOf(h3.title) > 0) {
myAccordion.showThisHideOpen(div);
found = true;
}
});
if (!found) myAccordion.showThisHideOpen(stretchers[0]);
}
答案 0 :(得分:0)
尝试将参数不透明度更改为false,并查看结果是否真的符合您的预期。