D
D
del9937882015-09-28 15:53:38
JavaScript
del993788, 2015-09-28 15:53:38

How to render nouislider tooltips as input?

Hello. I am using nouislider and needed to use tooltips. That is, the variables will move along with the slider. Here is an example using refreshless.com/nouislider/examples/#section-tooltips . Look at the part of the code:

// Add divs to the slider handles.
for ( var i = 0; i < tipHandles2.length; i++ ){
  tooltips2[i] = document.createElement('div');
  tipHandles2[i].appendChild(tooltips2[i]);
}
// Add a class for styling
tooltips2[0].className += 'sloower';
// Add additional markup
tooltips2[0].innerHTML = '<span id="sloower"></span>';
// Replace the tooltip reference with the span we just added
tooltips2[0] = tooltips2[0].getElementsByTagName('span')[0];

As a result, there will be a div with the class sloower and a span with the id lower. Tell me how to change to ? If I just write input, then He will open, insert a variable and close it. Maybe you can somehow describe the input in a different way? Tell me what can be done?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill Turovnikov, 2015-09-30
@turovnikoff

Have you seen this example on the same page? refreshless.com/nouislider/examples/#section-html5 It's
easy to combine them

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question