JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
<!-- Seccion on top of animated div -->
<section class="backgroundBlack">
<div class"indexContacto">
<p>lorem ipsum other stuff here</p>
</div>
</section>
<!-- Contact Section -->
<hr class="hrBlackToGrey" />
<!-- Redes Sociales -->
<div id="hex4" class="hex hex-4">
<div class="inner">
<h5>Síguenos a trevés de redes sociales</h5>
</div>
<div class="corner-1"></div>
<div class="corner-2"></div>
</div>
<section id="seccionGrid" class="colorGrey seccionGridOn">
</section>
<!-- Redes Sociales -->
<hr class="hrGreyToBlack" />
<!-- Footer -->
<section class="sectionBlack">
<div id="footer">
<p>lorem ipsum stuff</p>
</div>
</section>
CSS
#seccionGrid{
position: relative;
}
.seccionGridOn {
padding: 0px;
margin: 0px;
height:0px;
}
.seccionGridOff{
height:500px;
}
.hex {
width:150px;
height:86px;
background-repeat: no-repeat;
background-position: 50% 50%;
-webkit-background-size: auto 173px;
-moz-background-size: auto 173px;
-ms-background-size: auto 173px;
-o-background-size: auto 173px;
position: absolute;
margin: 0px;
left: 50%;
margin-left: -75px;
margin-top: -43px;
text-align:center;
z-index: 5;
overflow: visible;
}
.hex.hex-gap {
margin-left: 86px;
}
.hex a {
display:block;
width: 100%;
height:100%;
text-indent:-9999em;
position:absolute;
top:0;
left:0;
}
.hex .corner-1,
.hex .corner-2 {
position: absolute;
top:0;
left:0;
width:100%;
height:100%;
background: inherit;
z-index:-2;
overflow:hidden;
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
-ms-backface-visibility: hidden;
-o-backface-visibility: hidden;
backface-visibility: hidden;
}
.hex .corner-1 {
z-index:-1;
-webkit-transform: rotate(60deg);
-moz-transform: rotate(60deg);
-ms-transform: rotate(60deg);
-o-transform: rotate(60deg);
transform: rotate(60deg);
}
.hex .corner-2 {
-webkit-transform: rotate(-60deg);
-moz-transform: rotate(-60deg);
-ms-transform: rotate(-60deg);
-o-transform: rotate(-60deg);
transform: rotate(-60deg);
}
.hex .corner-1:before,
.hex .corner-2:before {
width: 173px;
height: 173px;
...
JavaScript
$(function() {
$("#hex4").click(function() {
$("#seccionGrid").toggleClass('seccionGridOff', 1000);
return false;
});
});