+ Reply to Thread
Results 1 to 10 of 67

Thread: We demand an official technical support to hide the phone number !

Hybrid View

  1. #1
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,191
    Hello,

    It can be used like this:

    Code:
    Only registered members can view the code.
    Last edited by Rudi; May 3, 2018 at 07:50 AM.

  2. #2
    Quote Originally Posted by Rudi View Post
    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
    <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}
    Last edited by Wei Hong; May 2, 2018 at 06:14 PM.

+ Reply to Thread