⬆️ ⬇️

jQuery.Tree

A fellow caffeine was looking for a jQuery plugin that makes a tree with checkboxes that have three states - fixed, removed and “slightly fixed”. Did not find, asked me to write. I wrote and shared with everyone.



Project Page: code.google.com/p/jquery-tree



Current version: jquery-tree.googlecode.com/files/jquery-tree.tar.gz



Example (on the people, then, maybe, I will transfer): max-at-work.narod.ru/jquery.tree.test.html

Example with js: max-at-work.narod.ru/jquery.tree.test.nojs.html disabled

')

Using:



<head>

<link rel= "stylesheet" type= "text/css" href= "css/jQuery.Tree.css" />

</head>

<body>

<ul id= "tree" >

<li>

<label><!-- -->

<input type= "checkbox" />

</label>

</li>

<li>

<label>

<input type= "checkbox" />

</label>

<ul>

<li>

<label>

<input type= "checkbox" />

</label>

</li>

</ul>

</li>

</ul>



<script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" >

</script>



<script type= "text/javascript" src= "jQuery.Tree.js" >

</script>



<script type= "text/javascript" >

$(document).ready(function(){

$( "#tree" ).Tree();

});

</script>

</body>




* This source code was highlighted with Source Code Highlighter .




It is distributed “as is”, it works in FF3.5, IE8, Chrome 4 (the others did not look).



Yes, on the Google code page, you can add feature references, I will look periodically there.



As 1x1 and Mikeprosoft suggest , there is a plugin with the same functionality jstree.com . The main difference is that mine allows you to send a form without js.



Source: https://habr.com/ru/post/77064/



All Articles