function count(currentId){
const elems = $('.cost__elem');
const randomItemId = $('.cost__item--active').data('count');
console.log(currentId);
elems.each((i, el) => {
const $el = $(el);
if (i < currentId){
$el.addClass('cost__elem--success')
}
$el.removeClass('cost__elem--success')
});
}