I'm using dragdealer.js and this is what I have got so far:
While dragging through the slide, it gives an output,
Question: 1) How can I add a "," (comma) to the output after hundreds unit while dragging?
-> Right now:-$ 4023
-> Required Output:- $ 4,023
2) How to implement step so that it shows output is in multiple of 100?
-> Required Output:- $ 4.100 (multiple of 100)
Here is my code:
JS:
$(function() {
new Dragdealer('just-a-slider', {
animationCallback: function(x, y) {
$('#dragValue').text(Math.round(x * 15000));
}
});
var availHeight = $('.content-body').outerHeight() -
$('.content-mask').outerHeight();
new Dragdealer('content-scroller', {
horizontal: false,
vertical: true,
yPrecision: availHeight,
animationCallback: function(x, y) {
$('.content-body').css('margin-top', -y * availHeight);
}
});
});