1
I want when I click on class atendimento
to classhorarios
keep display:block
Follows my HTML:
<div class="margin-top-30 pai">
<ul class="horarios">
<li class="horariosFechar">x</li>
</ul>
<div class="unidadesTotal">
<div style="display:none" class="unidadesConteudo margin-top-25">
<div class="atendimento unidadesAtendimento margin-top-15 f-left">horário de atendimento</div>
</div>
</div>
</div>
And my JQUERY:
$( ".atendimento" ).click(function() {
$(this).parent.parent.parent.find( ".horarios" ).css('display','block');
});
I mean, I’m coming back with the parent
to give the click, what happens, is that it is not working.
Damn, that noobisse mine, I’m even embarrassed, Ahaaha. That was it.
– Felipe Viero Goulart
The
parents()
didn’t work.– Felipe Viero Goulart
neither. However, the
parent()
has worked for you– Felipe Viero Goulart
As he said, you have to avoid using that amount of Parent, depending on the relativeses may be that one of them is an orphan. (laughs)
– Paulo Roberto Rosa
Neither the code originally posted by the OP nor yours worked as expected. His because he performs a routine at the click of a hidden DIV: How will it be clicked if it is hidden? And your why it lacks trigger context: When will this routine of yours be executed? At the same click of the hidden DIV? I suggest reviewing the answer of, who knows, supplement it
– Bruno Augusto