Documentation

Getting Started

jqxSlider represents a flexible jQuery Slider that lets the user select from a range of values by moving a thumb along a track. The widget is completely customizable in terms of appearance and offers numerous configuration options like mouse wheel and keyboard support, smooth or step-based slider and support for range sliders.
Every UI widget from jQWidgets toolkit needs its JavaScript files to be included in order to work properly.

The first step is to create html page and add links to the JavaScript files and CSS dependencies to your project. The jqxSlider widget requires the following files:

<head>
<link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css"/>
<script type="text/javascript" src="../../scripts/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
<script type="text/javascript" src="../../jqwidgets/jqxbuttons.js"></script>
<script type="text/javascript" src="../../jqwidgets/jqxslider.js"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-2FX5PV9DNT"></script><script>window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'G-2FX5PV9DNT');</script></head>

The next step is to create html element within the body of the html document.
<div id='jqxslider'></div>

The last step is to initialize the widget by adding the following script to the html document:
<script type="text/javascript">
$(document).ready(function () {
$("#jqxslider").jqxSlider();
});
</script>

To call a function (method), you need to pass the method name and parameters (if any) in the jqxSlider’s constructor.
$("#jqxslider").jqxSlider(‘setValue’, 3);
To get the result of a function after calling it, you can use the following syntax:
var selectedValue = $("#jqxslider").jqxSlider(‘getValue’);
To set a property (option), you need to pass the property name and value(s) in the jqxSlider’s constructor.
$("#jqxslider").jqxSlider({ showTicks: false });
To get a property (option), you need to pass the property name to the jqxSlider’s constructor.
To bind to an event of a UI widget, you can use basic jQuery syntax. Let’s suppose that you want to get the selected value after the user change the current one. The example code below demonstrates how to bind to the ‘change’ event of jqxSlider.

Basic Slider Sample

The result of the above code is:

Change event

The result of the above code is:

RangeSlider:

The result of the above code is: