Advanced User Interface Controls and Components
Checks whether scrollbar is visible in TreeView.
Param | Type | Details |
---|---|---|
type (optional) | String | A String which determines the type of scrollbar |
True if the scrollbar is visible, otherwise false.
Type parameter can accept either: 'horizontal' or 'vertical' values. Depending on its value, a check for horizontal or vertical scrollbar visibility is determined. If this parameter is omitted, the check is processed in both cases.
Supported in: v1.0.
In this example we are showing how to check whether the vertical scrollbar is visible or not in TreeView.
$(document).ready(function() {
// Create an instance of TreeView widget
var $tree = $('#treeview').treeview();
var checkScroll = function(){
var scrollVisible = $tree.treeview("isScrollBarVisible", "vertical");
if (scrollVisible)
alert("Vertical ScrollBar is visible");
else
alert("Vertical ScrollBar is not visible");
}
});
<!DOCTYPE html>
<html>
<head>
<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>
</head>
<body>
<div id="treeview" class="widget"></div>
</body>
</html>
.widget
{
width: 300px;
height: 300px;
}