Advertisement:

Author Topic: how can i show a message when click on phone number ???  (Read 1673 times)

shawn.hossan

  • Newbie
  • *
  • Posts: 30
how can i show a message when click on phone number ???
« on: April 19, 2014, 12:54:00 pm »
1st thing  >> how can hide phone number last 3 digit and after mouse hover on phone number show a message like this image bellow



after click on the phone number as showing the top image... will show anather message as showing bellow image



please give me solution

im using modern theme

calinbehtuk

  • Sr. Member
  • ****
  • Posts: 450
Re: how can i show a message when click on phone number ???
« Reply #1 on: April 19, 2014, 02:14:47 pm »
here are some methods:

You can translate it into your language site to better understand.

here's the code I've used them in theme modified by me, I replaced the city with phone number
Code: [Select]
<?php if ( osc_item_city_area() != "" ) { ?><li class="phone_icon"><?php _e("Telefon"'modern'); ?>:
<strong><span id="numbere" data-last="<?php echo osc_item_city_area(); ?>"><span>07<font style="color: red;">XXXXXXXX</font></span><img id="imaginenumar"style="float:right;margin-right:20px;" title="Arată numărul de telefon" src="<?php echo osc_current_web_theme_url('images/telefon2.png') ; ?>"/></span></strong>
</li><?php ?>                       
<script type="text/javascript">
$('#numbere').click(function() {
                       $(this).find('span').text( $(this).data('last') );
   
                   });
                   
                   $(document).ready(function() {
                      // reveal the tag with id="numbere", when the tag with id="imaginenumar" is clicked
                      $('#imaginenumar').click(function(){
                         $('#numbere').show( function() {
                        $('#imaginenumar').hide();
   
                      });
                           });
                             });
</script>

You can download the theme from this link for a better understanding. Changes are made ​​to the file item.php
« Last Edit: December 11, 2015, 11:02:06 am by garciademarina »

shawn.hossan

  • Newbie
  • *
  • Posts: 30
Re: how can i show a message when click on phone number ???
« Reply #2 on: April 22, 2014, 05:37:52 pm »
bro im not finding this script..

but its very helpful


thanks for reply me with a helpful script

calinbehtuk

  • Sr. Member
  • ****
  • Posts: 450
Re: how can i show a message when click on phone number ???
« Reply #3 on: April 22, 2014, 07:02:06 pm »
The script is in the code above, but you can follow this script in use at this address
http://www.ascultamp3.ro/imobiliare/camere-de-inchiriat/inchiriez-camera_i6
Green arrow shows the number of phone.
 
« Last Edit: December 11, 2015, 11:02:19 am by garciademarina »

shawn.hossan

  • Newbie
  • *
  • Posts: 30
Re: how can i show a message when click on phone number ???
« Reply #4 on: April 23, 2014, 09:15:08 am »
when i will mouse hover on the hiden phone number then show a text at the top,,,

after click the hiden phone number will show this number and change the text also....

at a time...

please check the tatiana theme
« Last Edit: December 11, 2015, 11:02:33 am by garciademarina »