Changing the information

The question was asked: 6 years 7 months ago   views: 9
0

Hello guys. How to make:
1) link the Choice of city: Moscow
and below is displayed the phone number with text.

When you click on Moscow to choose Peter and that the text of the phone was changed to new and back.

Thank you.

Asked: 28-11-2012 в 14:26:47

Answers   2

0
<div id='info'>Moscow, 654321</div>

$('#info').toggle(function() {
 $(this).html('Peter 123456');
}, function() {
 $(this).html('Moscow 654321');
});
Answered: 28-11-2012 в 14:28:27
but if the choice of cities and phone in different parts of the website is - 28-11-2012 в 14:47:06
0

And if so:

$('#info').toggle(function() {
$(this).html('Peter');
 $ ('name_layer').html('123456');
}, function() {
$(this).html('Moscow');
 $ ('name_layer').html('654321');
});
Answered: 28-11-2012 в 15:10:59