const items = document.querySelectorAll(".our-products_item");
for (let i = 0; i < items.length; i++) {
items[i].querySelector('.open').addEventListener("click", function(){btnClick(i)});
items[i].querySelector('.сlosed').addEventListener("click", function(){btnClick(i)});
}
function btnClick(item) {
items[item].querySelector('.over-product').classList.toggle("hidden");
}
<?php if( get_field('enable_sidebar') ): ?>
<?php // do something ?>
<?php endif; ?>
<div class="promoheaderz">
<div class='container'>
<?php while ( have_rows('headerblock') ) : the_row(); ?>
<div class="row" style="background-image: url(<?php echo get_sub_field('background_header')['url']; ?>);">
<div class='discount_text dis col-md-4'>
<?php the_sub_field('Text_left'); ?>
</div>
<div class='discount_img col-md-4'>
<?php $img = get_sub_field('Product_image'); ?>
<img src="<?php echo $img['url']; ?>" alt="<?php echo $img['alt']; ?>">
</div>
<div class='discount_text col-md-4 model'>
<?php the_sub_field('Text_right'); ?>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
Syntax: location [ = | ~ | ~* | ^~ ] uri { ... }
location @name { ... }
Default: —
Context: server, location