卧式手风琴

时间:2011-11-24 10:03:34

标签: javascript jquery

我已经构建了2个选项卡,每个选项卡在单击展开按钮时向下滑动。然而,我想要发生的是,如果一个已经扩展而另一个被点击,如果它自动关闭/隐藏另一个。目前我有两个功能

$(function() {
    $("#content1 h3.expand").toggler();
    $("#content1 div.demo").expandAll({trigger: "h3.expand", ref: "h3.expand"});

    $("#content1 div.post").expandAll({
      expTxt : "click to expand +", 
      cllpsTxt : "collapse -",
      ref : "div.collapse", 
      localLinks: "p.top a"    
    });    
});

$(function() {
    $("#content2 h3.expand").toggler();
    $("#content2 div.demo").expandAll({trigger: "h3.expand", ref: "h3.expand"});

    $("#content2 div.post").expandAll({
      expTxt : "click to expand +", 
      cllpsTxt : "collapse -",
      ref : "div.collapse", 
      localLinks: "p.top a"    
    });    
});

此外,如果您需要访问我的完整代码,请告诉我,我会将其放在一些网站空间。

由于

0 个答案:

没有答案