Progress control
Change progress for <Customize me> item
</> Source
<!DOCTYPE html>
<html>
<head>
<title>Progress control</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<link rel="stylesheet" type="text/css" href="../../../codebase/fonts/font_roboto/roboto.css"/>
<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
<script src="../../../codebase/dhtmlx.js"></script>
<style>
div#sidebarObj {
position: relative;
margin-left: 10px;
margin-top: 10px;
width: 600px;
height: 450px;
box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.09);
}
div.demo_links {
margin: 25px 9px;
font-family: Roboto, Arial, Helvetica;
font-size: 14px;
color: #404040;
}
div#cell_change_me {
font-family: Roboto, Arial, Helvetica;
font-size: 14px;
color: #404040;
width: 100%;
height: 100%;
margin: 0px;
overflow: auto;
}
div.demo_links button {
font-family: Roboto, Arial, Helvetica;
font-size: 14px;
color: #404040;
margin-left: 5px;
}
</style>
<script>
var mySidebar;
function doOnLoad() {
mySidebar = new dhtmlXSideBar({
parent: "sidebarObj",
icons_path: "../common/icons_material/",
width: 160,
items: [
{id: "documents", text: "Documents", icon: "documents.png"},
{id: "music", text: "Music", icon: "music.png"},
{id: "pictures", text: "Pictures", icon: "pictures.png"},
{id: "video", text: "Video", icon: "video.png"},
{type: "separator"},
{id: "change_me", text: "Customize me", icon: "recent.png", selected: true}
]
});
mySidebar.items("change_me").attachObject("cell_change_me");
}
function updateProgress(state) {
if (state == true) {
mySidebar.cells("change_me").progressOn();
} else {
mySidebar.cells("change_me").progressOff();
}
}
</script>
</head>
<body onload="doOnLoad();">
<div id="sidebarObj"></div>
<div class="demo_links">
Change progress for <Customize me> item
<button onclick="updateProgress(true);">On</button>
<button onclick="updateProgress(false);">Off</button>
</div>
<div id="cell_change_me" style="display: none;">
<div style="padding: 10px 8px;">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>
</div>
</body>
</html>
Documentation
Check documentation to learn how to use the components and easily implement them in your applications.