jQuery plugin for creating a family tree
Features:
- Draggable tree, so that you can draw a wide family tree
- On right click access to option menu.
- View data of exiting member.
- Add new member.
- Remove existing member from tree.
- You have to include following file
<link rel="stylesheet" href="jquery-ui.css">
<script src="jquery-1.11.0.js"></script>
<script src="jquery-ui.js"></script>
<script src="ps-family.js"></script>
<link rel="stylesheet" href="style.css"/>
-
Create div in which tree will be display
<div id="pk-family-tree"></div>
-
Include below query just after the above div
<script> $('#pk-family-tree').pk_family(); </script>
-
Done. At start it will ask you for entering first member.
-
To send data of tree to server:
$.send_Family({url: 'save_family.php'})
here url is the server file where you want to send family tree Note: tree data will be in JSON format and will be send through GET method
-
To display tree from preexist tree:
$('#pk-family-tree').pk_family_create({ data: '' });
Note: pk-family-tree must not be change