R
R
Roman Tuzov2020-04-24 17:17:32
JavaScript
Roman Tuzov, 2020-04-24 17:17:32

How to make according to the standard not display block but flex?

There is this block:

<div class="spoiler-title">
  <i class="fal fa-info-circle"></i>
</div>
<div class="spoiler-body">
  <span class="line"></span>
  <p class="comment">Развивайте в себе новые компетенции для профессионального развития и 
         достижения максимальной результативности.</p>
  <span class="line"></span>
</div>

At first spoiler-body is set to display none.
And there is this js code:
$(document).ready(function(){
 $('.spoiler-title').click(function(){
  $(this).parent().children('.spoiler-body').slideToggle();
  return false;
 });
});

In general, the problem is that when the spoiler-title is clicked, the display block is set to the spoiler-body to show the block, but this spoils everything for me. Here I am somehow trying to make it so that not block but flex is set. How to specify it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Tigran Abrahamyan, 2020-04-24
@Hutson

.css('display', 'flex');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question