Skip to content

Instantly share code, notes, and snippets.

+size(50px) //Dimentions
+display(flex)
+align-items(center)
+justify-content(space-around) //Centering objects
@podyankee
podyankee / JQUERY TABS
Created April 29, 2015 05:16
JQUERY TABS
$(".tab_item").not(":first").hide();
$(".wrapper .tab").show().click(function() {
var ind = $(this).index();
$(".wrapper .tab").removeClass("active").eq(ind).addClass("active");
$(".tab_item").hide().eq(ind).fadeIn()
}).eq(0).addClass("active");
<div class="wrapper">
<div class="tabs">
<span class="tab">Вкладка 1</span>
@podyankee
podyankee / jQuery Tabs Short
Created April 28, 2015 11:05
jQuery Tabs Short
HTML:
<div class="wrapper">
<div class="tabs">
<span class="tab">Вкладка 1</span>
<span class="tab">Вкладка 2</span>
<span class="tab">Вкладка 3</span>
</div>
<div class="tab_content">
<div class="tab_item">Содержимое 1</div>
<div class="tab_item">Содержимое 2</div>
@podyankee
podyankee / gist:90015b52cf5e85efd483
Created April 24, 2015 19:37
jQuery Resize Height
function heightDetect() {
$(".main_head").css("height", $(window).height());
};
heightDetect();
$(window).resize(function() {
heightDetect();
});