Last active
July 1, 2019 14:56
-
-
Save artemsites/1f1e602f3802b603c8197c2d51c78611 to your computer and use it in GitHub Desktop.
Кнопка показа и скрытия контента Посмотреть - Скрыть
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="question__main"> | |
<div class="question__icon"></div> | |
<div class="question__content"> | |
<div class="question__title"> | |
ВОПРОС:<br> | |
Можно ли выписать такого человека без его согласия? | |
</div> | |
<div class="question__answer"> | |
Ответ<br> | |
Можно выписать бывшего жильца без его согласия в судебном порядке. | |
</div> | |
<div class="question__answer-full"> | |
В зависимости от причин и обстоятельств переезда родственника, могут применяться различные правовые нормы для урегулирования данной ситуации: | |
</div> | |
<button class="question__button" value="1">Посмотреть подробный ответ</button> | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
$(document).ready(function(){ | |
$('.question__button').click(function(){ | |
$(this).parent().children('div.question__answer-full').toggle('normal'); | |
$(this).text() == 'Посмотреть подробный ответ' ? | |
$(this).text( "Скрыть" ) : | |
$(this).text( "Посмотреть подробный ответ" ); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment