JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<div>
<a href="javascript:;" class="phone_number">+7 (495) 118-26-47</a>
<span class="phone_show">Показать</span>
</div>
<div>
<a href="javascript:;" class="phone_number">+7 (495) 655-99-32</a>
<span class="phone_show">Показать</span>
</div>
JavaScript
const
symbolsForHide = 10,
phones = [];
$('.phone_show').click(function() {
const
$this = $(this),
$phone = $this.siblings('.phone_number'),
phone = phones[$phone.data('index')];
$phone.text(phone).attr('href', `tel: ${phone}`);
$this.remove();
});
const reg = new RegExp(`(.+).{${symbolsForHide}}$`);
$('.phone_number').attr('data-index', i => i).text((i, text) => {
phones[i] = text;
return text.replace(reg , '$1...');
});