Created
September 10, 2017 12:34
-
-
Save anoriar/d8089b70401ead0f7cfe34256099e8ea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//табы js | |
$('ul.tabs_caption').each(function() { | |
$(this).find('li').each(function(i) { | |
$(this).click(function(){ | |
$(this).addClass('active').siblings().removeClass('active') | |
.closest('div.tabs').find('div.tabs_content').removeClass('active').eq(i).addClass('active'); | |
}); | |
}); | |
}); | |
//css | |
.tabs_content | |
display: none | |
.tabs_content.active | |
display: block | |
<!-- html--> | |
<div class="tabs"> | |
<ul class="tabs_caption"> | |
<li class="active"><a href="#">Москва</a> /</li> | |
<li><a href="#"> Ярославль</a></li> | |
</ul> | |
<div class="tabs_content active"> | |
+7(495)***-**-** | |
</div> | |
<div class="tabs_content"> | |
+7(485)***-**-** | |
</div> | |
</div> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment