File: nonlinear-link.js

package info (click to toggle)
node-nouislider 15.8.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,928 kB
  • sloc: javascript: 5,234; php: 474; sh: 32; python: 28; makefile: 11
file content (10 lines) | stat: -rw-r--r-- 401 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
var nodes = [
    document.getElementById('lower-value'), // 0
    document.getElementById('upper-value')  // 1
];

// Display the slider value and how far the handle moved
// from the left edge of the slider.
nonLinearSlider.noUiSlider.on('update', function (values, handle, unencoded, isTap, positions) {
    nodes[handle].innerHTML = values[handle] + ', ' + positions[handle].toFixed(2) + '%';
});