Good, I'm working on a model, I have some idea of how to proceed but complicate me in doing so. First, it is a structure of boxes (divs) inside a container, organized to the grid, by clicking on 1 of them, it must expand and the 2 that are in the same row must be made smaller (without affecting the other rows).
Following this, each box will have a button (visible when clicking) that will expand a text box with the description, the box must be the size of the container, anchored to the expanded box (where it is activated) and the open should roll the rows below, in this case I would need to click on another part of the page (other than the open box) to close the box and resize the sizes.
//test toggle class
$(function() {
var boxanime = $(".box-anime-cont .box ");
boxanime.click(function() {
boxanime.removeClass("box-expand");
boxanime.removeClass("box-ret");
$(this).addClass("box-expand");
$(this).removeClass("box-ret");
boxanime.addClass("box-ret");
});
});
//fade box-anime-detail
$( ".btn-dt-anime" ).on( "click", function( event ) {
if($(".detail-anime-box").hasClass('open') ){
$(".detail-anime-box").removeClass('open');
}
else{
$( event.target ).closest( ".box-expand" ).children(".detail-anime-box").toggleClass('open');
}
});
<!--box-->
<div class="box">
<div class="box-anime">
<span class="caps">12</span>
<span class="tag-a">anime</span>
<img src="img/anime2.jpg" alt="">
<span class="titulo-box-anime">Titulo del anime</span>
<i class="fa fa-angle-down btn-dt-anime"></i>
</div>
<div class="detail-anime-box">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eius dolorem et quibusdam, sapiente ratione necessitatibus quos ea. Expedita, odit! Reprehenderit a, impedit ex illum consequatur, perferendis accusamus. Provident, eos, cum!
</div>
</div>
<!--//box-->
.detail-anime-box{
width: 0;
height: 0;
background: black;
color: #fff;
}
.open{/*togggle box**/
width: 230%;
height: 100%;
}