如题,并让标签跟随内容动。代码http://blog.csdn.net/qof3990/archive/2010/08/31/5852994.aspx

解决方案 »

  1.   

    这里提到了node,似乎是给panelcontent定位用的?
    Spry.Widget.CollapsiblePanel.prototype.getElementChildren = function(element)
    {
    var children = [];
    var child = element.firstChild;
    while (child)
    {
    if (child.nodeType == 1 /* Node.ELEMENT_NODE */)
    children.push(child);
    child = child.nextSibling;
    }
    return children;
    };
      

  2.   

    解决了,在width替换height的时候要区分大小写。谢谢大家的引用。
      

  3.   

    原来ht就是他每步变化的宽度,找到之后,加上content的left,和tab的left,就可以靠右隐藏了。
    var ht = this.transition(elapsedTime, this.fromWidth, this.distance, this.duration); this.content.style.width = ((ht < 0) ? 0 : ht) + "px";
    this.content.style.left = 270-((ht < 0) ? 0 : ht) + "px";
      this.tab.style.left = 240-((ht < 0) ? 0 : ht) + "px";
    注意把tab在content声明赋值过的地方顺次声明赋值,使用查找功能可以很方便的完成。