Again wp loop ...
There is a code
<?php /*Start the loop*/ ?> <?php $specialistquery = new WP_Query('category_name=our-specialists'); ?> <?php while ( $specialistquery->have_posts()) : $specialistquery->the_post()?> <div class="full clear"> <img class="close-full" src="" alt="Закрыть"> <div class="full-info clear"> <?php the_post_thumbnail(); ?> <p class="name visible"><?php the_title() ?></p> <div class="post-content"> <?php get_template_part( 'template-parts/content' ); ?> </div> <p class="specialization visible"></p> <p class="education visible"></p> <p class="experience visible">Стаж более лет</p> </div> </div> <?php endwhile; ?> <script type="text/javascript"> $('.close-full').click(function(){ $(this).find('.post-content').css({'display':'none'}); }); $('.full').click(function(){ $(this).find('.post-content').css({'display':'inline'}); }); </script>
The bottom line is that when you click on the div it opens and a full info appears with the close button. When you click close, the div should collapse to its original state.
div appears but close-full does not work. Nothing happens at all.
I suspect that it's all about parents, etc. Only I can not understand what to become attached to.