JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/themes/ui-lightness/jquery-ui.css">
Click the number to reveal:
<div id="number" data-last="1234">949<span>1234</span></div>
JavaScript
$('#number').toggle(function() {
$(this).find('span').text('XXXX');
}, function() {
$(this).find('span').text($(this).data('last'));
})
.click();