HTML Select Object Extension with Framework | jQuery treeSelection

Tree selection is tree browsing like the jQuery multi-select plugin that allows the user to select single or multiple options using radio buttons or checkboxes.

Expand the functionality of the existing HTML selection control, increase the tree list mode, and the upper limit on the number of multiple selections.

How to make use of it:

1. Import the jQuery treeSelection plugin stylesheet and javascript.

<link href="/path/to/jquery.treeSelection.css" rel="stylesheet" />
<script src="/path/to/cdn/jquery.min.js"></script>
<script src="/path/to/jquery.treeSelection.js"></script>

2. Convert a normal select box into a multi-select component using radio buttons.

<select name="mySelect" class="custom-select" multiple>
  <optgroup label="Alaskan/Hawaiian Time Zone">
    <option value="AK">Alaska</option>
    <option value="HI">Hawaii</option>
  </optgroup>
  <optgroup label="Pacific Time Zone">
    <option value="CA">California</option>
    <option value="NV">Nevada</option>
    <option value="OR">Oregon</option>
    <option value="WA">Washington</option>
  </optgroup>
  <optgroup label="Mountain Time Zone">
    <option value="AZ">Arizona</option>
    <option value="CO">Colorado</option>
    <option value="ID">Idaho</option>
    <option value="MT">Montana</option><option value="NE">Nebraska</option>
    <option value="NM">New Mexico</option>
    <option value="ND">North Dakota</option>
    <option value="UT">Utah</option>
    <option value="WY">Wyoming</option>
  </optgroup>
</select>

3. Import jQuery tree selection plugin stylesheet and javascript.

$(function(){
  $('select[name=mySelect]').treeSelection();
});

4. You are also allowed to define options in a JS array as follows:

<select name="mySelect" class="custom-select">
  
</select>
$('select[name=mySelect]').treeSelection({
  data: [{
    name: 'Google',
    items: [{
      name: 'Search Tools',
      items: ['Google Search', 'Google Alerts', 'Google Scholar']
    },{
      name: 'Advertising Services',
      items: ['Google Ads','AdMob','Google AdSense']
    }]
  }, {
    name: 'Apple',
    items: [{
      name: 'iPhone',
      items: ['iPhone 13','iPhone 12','iPhone SE']
    },{
      name: 'Apple Watch',
      items: ['Watch 7','Watch SE']
    }]
  }, {
    name: 'Amazon',
    items: ['Amazon Prime','Amazon Web Services','Consumer Electronics']
  }]
});

5. Add additional CSS styles and/or classes to the multi-select dropdown.

$('select[name=mySelect]').treeSelection({
  style: '',
  class: '',
});

Multiselect Dropdown With Checkbox & Radio Button, jquery tree Selection Plugin/Github, jquery dropdown treeview with checkbox


See Demo And Download

Official Website(windy2006): Click Here

This superior jQuery/javascript plugin is developed by windy2006. For extra Advanced Usage, please go to the official website.

Share