Добрый вечер. Подскажите, как сделать вывод значений 24 чел. 4000 руб. и тд как на скрине? (у цифр один цвет и размер шрифта у букв другой)
http://jsfiddle.net/VyacheslavY/22u4orc0/24/
jQuery(function() {
var tarif = 5,
client = 1,
revenue = 0,
check = 4000,
date = 1,
RevenueGrowth = 0,
rent = 0,
percentage = 0,
ClientsGrowth = 0,
RentPerMonth = 0,
TransactionCosts = 0,
RevenueGrownthTerminal = 0;
function recount() {
ClientsGrowth = client * 0.3;
ClientsGrowth = +ClientsGrowth.toFixed();
rent = String(date * RentPerMonth).replace(/(\d)(?=(\d{3})+(\D|$))/g, '$1 ');
TransactionCosts = ((client + ClientsGrowth) * check * date) / 100 * tarif;
RevenueGrownthTerminal = check * date * ClientsGrowth - TransactionCosts;
TransactionCosts = +TransactionCosts.toFixed();
revenue = (((client + ClientsGrowth) * date * check) - TransactionCosts).toFixed();
revenue = revenue.replace(/(\d)(?=(\d\d\d)+([^\d]|$))/g, '$1 ');
RevenueGrownthTerminal = RevenueGrownthTerminal.toFixed();
RevenueGrownthTerminal = RevenueGrownthTerminal.replace(/(\d)(?=(\d\d\d)+([^\d]|$))/g, '$1 ');
jQuery("#revenue span").html(revenue + ' руб');
jQuery("#ClientsGrowth span").html(ClientsGrowth + ' чел.');
jQuery("#rent span").html(rent + ' руб.');
jQuery("#TransactionCosts span").html(TransactionCosts + ' руб.');
jQuery("#RevenueGrownthTerminal span").html(RevenueGrownthTerminal + ' руб.');
jQuery("#tarifpercentage span").html(tarif + ' %');
};
recount();
jQuery('#tarif').change(function() {
tarif = jQuery('#tarif option:selected').val();
RentPerMonth = 0;
if (tarif == 3.3) {
RentPerMonth = 300;
} else if (tarif == 2.2) {
RentPerMonth = 900;
}
recount();
});
$(document).on("change keyup", "#client", function() {
client = +$(this).val();
$("#client-slider").slider("value", client);
recount();
});
$(document).on("change keyup", "#check", function() {
check = +$(this).val();
$("#check-slider").slider("value", check);
recount();
});
$(document).on("change keyup", "#date", function() {
date = +$(this).val();
$("#date-slider").slider("value", date);
recount();
});
});
$(function() {
$("#client-slider").slider({
range: "min",
value: 1,
min: 1,
max: 300,
slide: function(event, ui) {
$('#client').val(ui.value).trigger("change");
}
});
$("#client").val($("#client-slider").slider("value"));
});
$(function() {
$("#check-slider").slider({
range: "min",
value: 4000,
min: 1,
max: 500000,
slide: function(event, ui) {
$("#check").val(ui.value + " руб.").trigger("change");
}
});
$("#check").val($("#check-slider").slider("value"));
});
$(function() {
$("#date-slider").slider({
range: "min",
value: 1,
min: 1,
max: 60,
slide: function(event, ui) {
$("#date").val(ui.value).trigger("change");
}
});
$("#date").val($("#date-slider").slider("value"));
});