jQuery Tree

Bind to the checkChange event by type: jqxTree. Author: http://jqwidgets.com

by jqwidgets

HTML

<link rel="stylesheet" href="https://jqwidgets.com/public/jqwidgets/styles/jqx.base.css">
<script src="https://jqwidgets.com/public/jqwidgets/jqx-all.js"></script>
<link rel="stylesheet" href="https://jqwidgets.com/public/jqwidgets/styles/jqx.energyblue.css">
Check an item
<div style='margin-top: 20px;' id='jqxTree'>
    <ul>
        <li item-selected='true'>Home</li>
        <li item-expanded='true'>Solutions
            <ul>
                <li>Education</li>
                <li>Financial services</li>
                <li>Government</li>
                <li>Manufacturing</li>
                <li>Solutions
                    <ul>
                        <li>Consumer photo and video</li>
                        <li>Mobile</li>
                        <li>Rich Internet applications</li>
                        <li>Technical communication</li>
                        <li>Training and eLearning</li>
                        <li>Web conferencing</li>
                    </ul>
                </li>
                <li>All industries and solutions</li>
            </ul>
        </li>
    </ul>
</div>

JavaScript

$('#jqxTree').jqxTree({
       height: '300px',
       width: '300px',
       theme: 'energyblue',
       checkboxes: true
   });
   $('#jqxTree').on('checkChange', function (event) {
       var args = event.args;
       var element = args.element;
       var checked = args.checked;
       var label = args.label;
       var checkString = checked ? "You checked: " :  "You unchecked: ";
       alert(checkString + $(element).text());
   });