Advanced User Interface Controls and Components

IntegralUI Web

Documentation and API Reference


Gets the parent item of the specified item.


itemObjectThe item for which parent item is requested

Return Value

An item object that represents the parent of the specified item.

Version Information

Supported in: v1.0.


In this example we are showing how to call getItemParent method. If item is present in tree hierarchy, an alert box will popup with message stating the parent.

$(document).ready(function() {

// Create an instance of TreeView widget

var $tree = $('#treeview').treeview();


var showParent = function(){

var item = $tree.treeview("findItemById", '231');

if (item){

var parent = $tree.treeview("getItemParent", item);

if (parent)

alert("The parent for item " + item.text + " is: " + parent.text);


alert("The item " + item.text + " has no parent, it's a root item");




<!DOCTYPE html>



<link rel="stylesheet" href="css/integralui.treeview.css" />

<link rel="stylesheet" href="css/themes/theme-blue.css" />

<script type="text/javascript" src="external/jquery-1.9.1.min.js"></script>

<script type="text/javascript" src="external/jquery.ui.core.min.js"></script>

<script type="text/javascript" src="external/jquery.ui.widget.min.js"></script>

<script type="text/javascript" src="js/jquery.integralui.widget.min.js"></script>

<script type="text/javascript" src="js/jquery.integralui.treeview.min.js"></script>



<div id="treeview" class="widget">







<li data-expanded=false><span>Item23</span></li>



<li data-expanded=false><span>Item232</span>












<li data-expanded=false><span>Item3</span></li>













width: 300px;

height: 300px;


See Also