There is the following file structure, I want to do the following - when clicking on main, it is checked if show-title (has the display:block property), then do nothing, if when clicking on main hide-title (has the display:block property), then make an animation before the section about-header. I do not know how to write such checks: (
<div class=main> <h4 class="show-title">Показать полностью<h4> <h4 class="hide-title>Свернуть<h4> <div> $(".hide-title").click(function() { $("html, body").animate({ scrollTop : $(".about-header").offset().top }, 400); });