jQuery树形插件 jquery.dynatree.js

码农软件 · 软件分类 · jQuery 树形控件 · 2019-12-25 22:44:48

软件介绍

dynatree 是一个 jQuery 的插件,用来在网页上显示树形控件的脚本。

示例代码:

<html>
<head>
  <!-- 1. Include jQuery and dynatree libraries: -->
  <script src='../jquery/jquery.js' type='text/javascript'></script>
  <script src='../jquery/ui.core.js' type='text/javascript'></script>
  <script src='../jquery/jquery.cookie.js' type='text/javascript'></script>

  <link href='../src/skin/ui.dynatree.css' rel='stylesheet' type='text/css'>
  <script src='../src/jquery.dynatree.js' type='text/javascript'></script>
   
  <script type='text/javascript'>
  // Add code to initialize the tree when the document is loaded:
  $(function(){
    // 2. Attach the dynatree widget to an existing <div id="tree"> element
    //    and pass the tree options as an argument to the dynatree() function:
    $("#tree").dynatree({
      // Pass an array of nodes (and child nodes)
      children: [
        {title: "Item 1"},
        {title: "Folder 2", isFolder: true, key: "folder2",
          children: [
            {title: "Sub-item 2.1"},
            {title: "Sub-item 2.2"}
          ]
        },
        {title: "Item 3"}
      ],
      onActivate: function(dtnode) {
        // This function is called, when a node is clicked
        // A DynaTreeNode object is passed as argument.
        alert("You activated " + dtnode.data.title);
      }
    });
  });
  </script>
</head>
<body>
  <!-- 3. Add a <div> element where the tree should appear: -->
  <div id="tree"> </div>
  [...]
</body>
</html>

本文地址:https://codercto.com/soft/d/21959.html

Flexible Rails

Flexible Rails

Peter Armstrong / Manning Publications / 2008-01-23 / USD 44.99

Rails is a fantastic tool for web application development, but its Ajax-driven interfaces stop short of the richness you gain with a tool like Adobe Flex. Simply put, Flex is the most productive way t......一起来看看 《Flexible Rails》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具