It needs to be implemented: when we click on .dev-site-opener - .dev-site-text gets the same height as its child .dev-site-text> p. And in the end we get an animation where the text appears smoothly. But you need to make sure that when one block is open and we click on the other, the one that is open is closed, and the one that we clicked opens.
$('.dev-site-opener').click(function() { var _this = $(this); var text = $(this).parent().find('.dev-site-text'); if (!_this.hasClass('active-1')) { text.height(1); _this.addClass('active-1'); } else { text.height(text.find('p').height()); _this.removeClass('active-1'); } }); .slider-dev-site-wrap { margin-top: 40px; border-top: 1px solid #000; } .slide-dev-site-cont { margin: 80px auto; width: 1120px; } .slide-dev-site-cont .left-dev-site { float: left; width: 538px; text-align: center; } .slide-dev-site-cont .right-dev-site { float: left; width: 538px; text-align: center; } .right-dev-site-title { display: block; vertical-align: top; font: 500 27px/29px 'Proxima Nova', Arial, Helvetica, sans-serif; position: relative; border-bottom: 1px solid #1f1f1f; padding: 0 0 15px; margin: 0 0 30px; text-align: left; } .right-dev-site-title:after { content: ''; position: absolute; bottom: -2px; left: 0; background: #f9da00; width: 100px; height: 3px; } .dev-site-list { text-align: left; } .dev-site-list li { list-style: none; margin-bottom: 20px; } .dev-site-list .dev-site-opener { text-transform: uppercase; position: relative; font-weight: 300; border-bottom: 1px dotted; cursor: pointer; display: inline; font-size: 14px; color: #282828; } .dev-site-list .dev-site-opener:before { width: 15px; height: 15px; content: ''; position: absolute; display: inline-block; vertical-align: middle; background: #000; left: -30px; top: 2px; } .dev-site-list .active-1:before { transform: rotate(45deg); } .dev-site-list .dev-site-text { padding-left: 40px; overflow: hidden; line-height: 22px; color: #757575; font-size: 14px; transition: 0.2s ease-in-out; height: 1px; } <div class="right-dev-site-body"> <ul class="dev-site-list"> <li> <div class="dev-site-opener">ΠΡΠΎΠ΅ΠΊΡΠΈΡΠΎΠ²Π°Π½ΠΈΠ΅. Π Π°Π·ΡΠ°Π±ΠΎΡΠΊΠ° ΡΠ½ΠΈΠΊΠ°Π»ΡΠ½ΠΎΠ³ΠΎ ΠΈ ΡΠΊΡΠΊΠ»ΡΠ·ΠΈΠ²Π½ΠΎΠ³ΠΎ Π΄ΠΈΠ·Π°ΠΉΠ½Π°</div> <div class="dev-site-text"> <p> ΠΡΠΎΠ΅ΠΊΡΠΈΡΠΎΠ²Π°Π½ΠΈΠ΅ ΠΈΠ½ΡΠ΅ΡΡΠ΅ΠΉΡΠ° Π±ΡΠ΄ΡΡΠ΅Π³ΠΎ ΡΠ°ΠΉΡΠ°. ΠΡΠΎΠ΄ΡΠΌΡΠ²Π°Π½ΠΈΠ΅ ΡΠ·Π°Π±ΠΈΠ»ΠΈΡΠΈ. Π‘ΠΎΠ²ΠΎΠΊΡΠΏΠ½ΠΎΡΡΡ Π³ΡΠ°ΡΠΈΡΠ΅ΡΠΊΠΈΡ
ΡΠ»Π΅ΠΌΠ΅Π½ΡΠΎΠ², ΡΡΠΈΡΡΠΎΠ², ΡΠ²Π΅ΡΠΎΠ², ΠΈΠ½Π΄ΠΈΠ²ΠΈΠ΄ΡΠ°Π»ΡΠ½ΡΡ
ΡΠ΅ΠΌΠ°ΡΠΈΡΠ΅ΡΠΊΠΈΡ
ΠΈΠΊΠΎΠ½ΠΎΠΊ, ΡΠ΅Π°Π»ΠΈΠ·ΠΎΠ²Π°Π½Π½ΡΡ
Π½Π° ΡΠ°ΠΉΡΠ΅. </p> </div> </li> <li> <div class="dev-site-opener">ΠΡΠΎΠ΅ΠΊΡΠΈΡΠΎΠ²Π°Π½ΠΈΠ΅2. Π Π°Π·ΡΠ°Π±ΠΎΡΠΊΠ° ΡΠ½ΠΈΠΊΠ°Π»ΡΠ½ΠΎΠ³ΠΎ ΠΈ ΡΠΊΡΠΊΠ»ΡΠ·ΠΈΠ²Π½ΠΎΠ³ΠΎ Π΄ΠΈΠ·Π°ΠΉΠ½Π°</div> <div class="dev-site-text"> <p> ΠΡΠΎΠ΅ΠΊΡΠΈΡΠΎΠ²Π°Π½ΠΈΠ΅ ΠΈΠ½ΡΠ΅ΡΡΠ΅ΠΉΡΠ° Π±ΡΠ΄ΡΡΠ΅Π³ΠΎ ΡΠ°ΠΉΡΠ°2. ΠΡΠΎΠ΄ΡΠΌΡΠ²Π°Π½ΠΈΠ΅ ΡΠ·Π°Π±ΠΈΠ»ΠΈΡΠΈ. Π‘ΠΎΠ²ΠΎΠΊΡΠΏΠ½ΠΎΡΡΡ Π³ΡΠ°ΡΠΈΡΠ΅ΡΠΊΠΈΡ
ΡΠ»Π΅ΠΌΠ΅Π½ΡΠΎΠ², ΡΡΠΈΡΡΠΎΠ², ΡΠ²Π΅ΡΠΎΠ², ΠΈΠ½Π΄ΠΈΠ²ΠΈΠ΄ΡΠ°Π»ΡΠ½ΡΡ
ΡΠ΅ΠΌΠ°ΡΠΈΡΠ΅ΡΠΊΠΈΡ
ΠΈΠΊΠΎΠ½ΠΎΠΊ, ΡΠ΅Π°Π»ΠΈΠ·ΠΎΠ²Π°Π½Π½ΡΡ
Π½Π° ΡΠ°ΠΉΡΠ΅. </p> </div> </li> </ul> </div>