Because a lot of people ask me how to make phone and mail hide like I have in
http://iklangratis.net, I will explain a simple method how to hide last 4 digit phone number using javascript.
1. Display number after user click
<div id="phonenumber" data-last="1234">949<span>XXXX</span></div>
$('#phonenumber').click(function() {
$(this).find('span').text( $(this).data('last') );
});
2. To make it toggle on click.
$('#phonenumber').toggle(function() {
$(this).find('span').text( $(this).data('last') );
},function() {
$(this).find('span').text( 'XXXX' );
});
3. To show phonenumber if user have no javascript
<div id="phonenumber" data-last="1234">949<span>1234</span></div>
$('#phonenumber').toggle(function() {
$(this).find('span').text( 'XXXX' );
},function() {
$(this).find('span').text( $(this).data('last') );
})
.click();
Note: If you want to make your data unreadable by robot or crawler, you have to
use image to display phone number.