小海賊的夜晚

            BlogJava :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
            14 隨筆 :: 0 文章 :: 9 評(píng)論 :: 0 Trackbacks

          Functions

          add()

          Adds a node to the tree.
          Can only be called before the tree is drawn.

          id, pid and name are required.

          Parameters

          Name Type Description
          id Number Unique identity number.
          pid Number Number refering to the parent node. The value for the root node has to be -1.
          name String Text label for the node.
          url String Url for the node.
          title String Title for the node.
          target String Target for the node.
          icon String Image file to use as the icon. Uses default if not specified.
          iconOpen String Image file to use as the open icon. Uses default if not specified.
          open Boolean Is the node open.

          Example

          mytree.add(1, 0, 'My node', 'node.html', 'node title', 'mainframe', 'img/musicfolder.gif');


          openAll()

          Opens all the nodes.
          Can be called before and after the tree is drawn.

          Example

          mytree.openAll();


          closeAll()

          Closes all the nodes.
          Can be called before and after the tree is drawn.

          Example

          mytree.closeAll();


          openTo()

          Opens the tree to a certain node and can also select the node.
          Can only be called after the tree is drawn.

          Parameters

          Name Type Description
          id Number Identity number for the node.
          select Boolean Should the node be selected.

          Example

          mytree.openTo(4, true);

          Configuration

          Variable Type Default Description
          target String true Target for all the nodes.
          folderLinks Boolean true Should folders be links.
          useSelection Boolean true Nodes can be selected(highlighted).
          useCookies Boolean true The tree uses cookies to rember it's state.
          useLines Boolean true Tree is drawn with lines.
          useIcons Boolean true Tree is drawn with icons.
          useStatusText Boolean false Displays node names in the statusbar instead of the url.
          closeSameLevel Boolean false Only one node within a parent can be expanded at the same time. openAll() and closeAll() functions do not work when this is enabled.
          inOrder Boolean false If parent nodes are always added before children, setting this to true speeds up the tree.

          Example

          mytree.config.target = "mytarget";

          posted on 2005-07-27 11:33 海賊 閱讀(665) 評(píng)論(0)  編輯  收藏 所屬分類: Javascripts

          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
          相關(guān)文章:
           
          主站蜘蛛池模板: 贵溪市| 肃南| 宁乡县| 哈密市| 大足县| 白水县| 汝南县| 平遥县| 咸丰县| 大荔县| 读书| 酉阳| 克拉玛依市| 濮阳市| 攀枝花市| 永靖县| 叶城县| 石嘴山市| 墨江| 华阴市| 山丹县| 白朗县| 益阳市| 浦东新区| 鄂托克前旗| 长海县| 留坝县| 巴塘县| 盱眙县| 玛曲县| 资源县| 临猗县| 贡嘎县| 凤凰县| 丰宁| 手游| 菏泽市| 岳阳市| 西贡区| 沙河市| 巴彦淖尔市|