Dynatree - Bugreport

Dynatree sample as base for bug reports

HTML

<script src="http://dynatree.googlecode.com/svn/trunk/src/jquery.dynatree.js"></script>
<link rel="stylesheet" href="http://wwwendt.de/tech/dynatree/src/skin-vista/ui.dynatree.css">
<div id="tree">rfff </div>
<div id="info"></div>
<button id="btn1">Button 1</button>

CSS

span.custom1 a { color: red; }
.custom1 span.dynatree-icon  /* custom icon */
{
    background-position: -48px -48px;
}

JavaScript

$(function(){
    $("#tree").dynatree({
      onActivate: function(node) {
        $("#info").text("You activated " + node);
      },
      children: [
        {title: "Item 1"},
        {title: "Folder 2", isFolder: true,
          children: [
            {title: "Sub-item 2.1"},
            {title: "Sub-item 2.2"}
          ]
        },
        {title: "Item 3" ,isFolder: true}
      ]
    });
    
    $("#btn1").click(function(e){
        $("#tree").dynatree('getRoot').search("Sub-item");
        //var node = $("#tree").dynatree("getActiveNode");
        //$(node.span).addClass("custom1");
    });
    
    
});