Skip to content

Instantly share code, notes, and snippets.

View serjnazarov's full-sized avatar

serjnazarov serjnazarov

  • Russia
View GitHub Profile
@serjnazarov
serjnazarov / refiontree.html
Last active October 26, 2018 12:53
Just a simple JQuery-based checkbox tree with sweet manners :-) Tree is expandable, checkboxes have logical actions and may be indeterminate. This example uses Russian regions, but you can use anything. Fieldset MUST wrap every category with sub-categories. Form must has id="tree". Use Bootstrap for better results!
<!DOCTYPE html>
<html>
<head>
<meta charset="utf8">
<!-- <link rel="stylesheet" href="./bootstrap.min.css"> -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script>
$(function() {