dwz中展开左侧菜单的指定列表

修改js/dwz.ui.js中的

$('div.accordion', $p).each(function(){
var $this = $(this);
$this.accordion({fillSpace:$this.attr("fillSpace"),alwaysOpen:true,active:1});
});

 

如果要默认是收缩状态的话,将alwaysOpen改为false。

如果是最后一个展开的话,代码改为如下:

$('div.accordion', $p).each(function(){
var $this = $(this);
var ac_lenth = $this.find('div.accordionHeader').length;
ac_lenth = ac_lenth > 1 ? ac_lenth-1 : 1;
$this.accordion({fillSpace:$this.attr("fillSpace"),alwaysOpen:true,active:ac_lenth});
});

 

如果是指定的话,可以修改索引的。其中active中的索引是从0开始的。

posted @ 2013-04-10 18:45  幻星宇  阅读(435)  评论(0编辑  收藏  举报