Hello All,
Yes, we can do it of course but you need to create new ticket and we will create it as a small customization.
Hello All,
Yes, we can do it of course but you need to create new ticket and we will create it as a small customization.
Hi Rudi,
For your previous code:
When I click on number it immediately trigger call. How can I make it so first click is reveal phone, then second click will trigger call function?Quote:
<script>
{literal}
$(document).ready(function(){
var phones = $('div[id*="phone"] .value a');
$(phones).each(function(){
var phone = $(this);
var default_value = phone.text();
var chars_to_mask = default_value.length - 4;
var mask_phone = Array(chars_to_mask + 1).join("*") + default_value.substring(chars_to_mask);
phone.text(mask_phone).removeAttr('href').toggleCl ass('mask');;
phone.css('cursor', 'pointer');
$(phone).filter('.mask').click(function(){
$(this).text(default_value);
$(this).attr('href', 'tel:' + default_value).toggleClass('mask');;
});
});
});
{/literal}
</script>
Hi Wei Hong,
change:
to:Code:Only registered members can view the code.
Code:Only registered members can view the code.
Hi Rudi, can you modify the code above for a 'number type' listing field (not phone type) with key 'beru_phone' so that when user input this number: 0123456789. It will show 01-2345-6789 on listing detail page? This is because in another country they have different format.
Hello,
It can be used like this:
Code:Only registered members can view the code.
Hi Rudi,
Thank you for your help. But it's weird I think it only works for phone type listing field. Even though I input correct field_key of 'beru_phone,' which is number type listing field, it doesn't change anything. :(
This is what i have in listing detail page
Quote:
<script>
{literal}
$(document).ready(function(){
var phones = $('div[id*="beru_phone"] .value a');
$(phones).each(function(){
var phone = $(this);
var default_value = phone.text();
var chars_to_mask = default_value.length - 4;
var mask_phone = Array(chars_to_mask + 1).join("*") + default_value.substring(chars_to_mask);
phone.text(mask_phone).removeAttr('href').toggleCl ass('mask');;
phone.css('cursor', 'pointer');
$(phone).filter('.mask').click(function(){
$(this).text(default_value);
$(this).attr('href', 'tel:' + default_value).toggleClass('mask');;
});
});
});
{/literal}
</script>
{/if}