0
According to this question I asked earlier and was resolved I have another question that happens after that.
$(".membrosClick").click(function() {
var el = $(this);
el.css("width", "766px");
el.children().show();
});
$(".membrosFechar").click(function() {
$(".listagemEsc").hide();
});
<li class="membrosClick">
<div name="Listagem de Membros" style="background-image: url('./imagens/EDGAR-GUERRA.png'); width:383px; height:849px">
<div class="editable subir">
<h2>Edgar</h2>
<h3>Guerra</h3>
<div class="bandaBarra bandaBarraBranca margin-left-65 margin-top-10 barraNone"></div>
</div>
</div>
<div class="listagemEsc p-relative">
<div class="membrosFechar"></div>
<span>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo.</span>
</div>
</li>
<li class="membrosClick">
<div name="Listagem de Membros" style="background-image: url('./imagens/ANTONIO-GUERRA.png'); width:383px; height:849px">
<div class="editable subir">
<h2>Antônio</h2>
<h3>Guerra</h3>
<div class="bandaBarra bandaBarraBranca margin-left-65 margin-top-10 barraNone"></div>
</div>
</div>
<div class="listagemEsc p-relative">
<div class="membrosFechar"></div>
<span>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo.</span>
</div>
</li>
When I click on membrosClick
he leaves the div with 766px. With that the div listagemDesc
appears. This is working perfectly. However, there is a div inside called membrosFechar
, which is an X I made for when the user click, the div listagemDesc
keep display:hide
and I think the ideal is also the div membrosClick
get 383px, which is its original size before the click. I’m not getting it done.
UPDATE
I figured it out, just include the event.stopPropagation();
as answered in Soen.
Dude, always look at the browser error console, it at all times will show you where the error is happening.
– juniorgarcia
Dude, create the answer to your problem and mark it as right, so it makes it easier when, in the future, someone has the same problem.
– fernandosavio