title: Dynatree with real checkbox
body: <p>I wanted to have a checkbox tree form and I used dynatree jquery tree to do that.
  Then I found out dynatree doesn't use real checkboxes so I placed html checkbox inside the tree.</p>
  
  <p>Its working fine until I realise when the node is expanded/collapsed it remvoe the checked (the tick) value
  Is there a way in javascript I can write a function to prevent this happening?</p>
  
  <p>Thanks so much. Here is my code</p>
  
  <pre><code> $(function(){
        $("#tree").dynatree({
          // using default options
  
          checkbox: false,
          selectMode: 3,
          noLink: true,
  
  
      });
  
   &lt;div id="tree"&gt;
      &lt;ul&gt;
        &lt;li id="key1" title="Look, a tool tip!"&gt;
          &lt;input type="checkbox" id="chb-key1" name="selected_items" value="Item 1" class="" /&gt;Item 1&lt;/li&gt;
        &lt;li id="key2"&gt;
          &lt;input type="checkbox" id="chb-key2" name="selected_items" value="Item 2" /&gt;Item 2&lt;/li&gt;
        &lt;li id="key3"&gt;
          &lt;input type="checkbox" id="chb-key3" name="selected_items" value="Item 3" /&gt;Folder with some children
          &lt;ul&gt;
            &lt;li id="key31"&gt;
              &lt;input type="checkbox" id="chb-key31" name="selected_items" value="Item 3.1" /&gt;Sub-item 3.1&lt;/li&gt;
            &lt;li id="key32" class="selected"&gt;
              &lt;input type="checkbox" id="chb-key32" name="selected_items" value="Item 3.2" /&gt;Sub-item 3.2
              &lt;ul&gt;
                &lt;li id="key321" class="selected"&gt;
                  &lt;input type="checkbox" id="chb-key321" name="selected_items" value="Item 3.2.1" /&gt;Sub-item 3.2.1&lt;/li&gt;
                &lt;li id="key322" class="selected"&gt;
                  &lt;input type="checkbox" id="chb-key322" name="selected_items" value="Item 3.2.2" /&gt;Sub-item 3.2.2&lt;/li&gt;
              &lt;/ul&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;/li&gt;
  </code></pre>