var $document = $(document);
var selector = '[data-rangeslider]';
var $element = $(selector);
// For ie8 support
var textContent = ('textContent' in document) ? 'textContent' : 'innerText';
// Example functionality to demonstrate a value feedback
function valueOutput(element) {
var value = element.value;
var output = element.parentNode.getElementsByTagName('output')[0] || element.parentNode.parentNode.getElementsByTagName('output')[0];
output[textContent] = value + 'mm';
}
$document.on('input', 'input[type="range"], ' + selector, function(e) {
valueOutput(e.target);
});
in the line output[textContent] = value + 'mm';
I need the output as value + '<span class="classname">mm</span>'
I tried most of the things and did a lot of research but no luck so far.
This might be something very simple but I am too new to JavaScript so couldn't figure it out.