Attach to slider

</> Source
<!DOCTYPE html>
	<title>Attach to slider</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>
		div#sliderObj {
			margin-top: 100px;
			margin-left: 30px;

		var mySlider;
		var myPop;

		function doOnLoad() {

			// init slider
			mySlider = new dhtmlXSlider({
				parent: "sliderObj",
				size: 150,
				value: 5,
				step: 1,
				min: 0,
				max: 10

			// attach popup to slider
			myPop = new dhtmlXPopup({ slider: mySlider });

			// change popup value when slider moved
			mySlider.attachEvent("onChange", function(value){

			// set initial value for popup

		function updatePopupValue(value) {
			myPop.attachHTML(window.dhx4.template("Current value: #value#", {value:value}));

<body onload="doOnLoad()">
	<div id="sliderObj"></div>


Check documentation to learn how to use the components and easily implement them in your applications.