Hello Rodi, Are you able to add this change for version 4.7? Thanks a lot!!!!!
Hello Rodi, Are you able to add this change for version 4.7? Thanks a lot!!!!!
Hello Radoslav,
You can add this code the same way to your script following the instructions below as it's not a part of 4.7
Hi Rudi,
I'm using this code to hide number by *********1234
Is there anyway if I could modify the code above so the phone number show a text:<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_number');
phone.css('cursor', 'pointer');
$(phone).filter('.mask_number').click(function(sho w){
$(this).text(default_value);
$(this).attr('href', 'tel:' + default_value).toggleClass('mask_number');
show.preventDefault();
$(phone).unbind('click').bind('click');
});
});
});
{/literal}
</script>
Click here to show
Instead of
*******1234
Thank you
Hi Rudi,
I've inserted the code (same code as in Wei Hong's comment) into my v. 4.7 but unfortunately nothing happened. It doesn't hide any part of the phone field in any of the blocks. I've inserted the code into: listing_details_seller.tpl, listing_details_sidebar.tpl, and contact_seller_form.tpl. My phone field key is "phone" so didn't change anything in the code, just inserted it as is.
Any ideas what I've done wrong?
Happy New Year Flynax Team,
Hi Rudi,
I noticed that if internet connection is slow or sometimes lag a bit, the page show the phone number first for example: 415-123-4567, then a second later it is hidden as your code takes effect to be: "Click here to show" I think it is because the code wasn't fully loaded
Is there anyway if we can prevent the phone number not to show before script is fully loaded, that way there phone number won't be revealed if connection lag/slow
Thanks
Happy New Year !!!
Hello,
Happy New Year!
go to your template > css > style.css > add the following style:
and change in jquery code:Code:Only registered members can view the code.
to:Code:Only registered members can view the code.
Code:Only registered members can view the code.
Last edited by Rudi; January 4, 2019 at 03:47 AM.