This is my html code:
<div class="w-grid-list">
<article class="product_cat-19">
<div class="w-grid-item-h">
<a class="w-grid-item-anchor" href="#"></a>
<div class="w-vwrapper">
<div class="w-post-elm">
<a href="">
title1
</a>
</div>
<div class="w-post-elm">
<span class="w-post-elm-before">color code : </span>
<span class="sku">228</span>
</div>
<div class="w-html">color</div>
</div>
</div>
</article>
<article class="product_cat-19">
<div class="w-grid-item-h">
<a class="w-grid-item-anchor" href="#"></a>
<div class="w-vwrapper">
<div class="w-post-elm">
<a href="">
title2
</a>
</div>
<div class="w-post-elm">
<span class="w-post-elm-before">color code : </span>
<span class="sku">229</span>
</div>
<div class="w-html">color</div>
</div>
</div>
</article>
</div>
<div class="owl-stage">
<div class="owl-item active" style="width: 204px;">
<article class="product_cat-18">
<div class="w-grid-item-h">
<div class="w-hwrapper">
<div class="w-vwrapper">
<div class="w-post-elm">
<a href="#"></a></div>
<h2 class="w-post-elm">
<a href="#">title of product1</a>
</h2>
<div class="w-post-elm">
<span class="Price-amount">140<span class="Price-currencySymbol">$</span></span>
</div>
</div>
</div>
</div>
</article>
</div>
<div class="owl-item active" style="width: 204px;">
<article class="product_cat-19">
<div class="w-grid-item-h">
<div class="w-hwrapper">
<div class="w-vwrapper">
<div class="w-post-elm">
<a href="#"></a></div>
<h2 class="w-post-elm">
<a href="#">title of product2</a>
</h2>
<div class="w-post-elm">
<span class="Price-amount">120<span class="Price-currencySymbol">$</span></span>
</div>
</div>
</div>
</div>
</article>
</div>
</div>
And I want to hide(style display:none) Div Element just with "owl-item" class which it has "article" tag with "product_cat-19" class.
my JavaScript code:
<script>
// get the heading from the first article
const product_cat_19 = document.querySelector('.product_cat-19');
// get its parent, the current article
const currentArticle = product_cat_19.parentNode.style.display='none';
</script>
this code can not hide "owl-item" class. but hide div with "w-grid-list" class. is there any way to do this with css only or js need? I searched on Google and found only solutions to solve this problem with JavaScript that didn't work properly. any one can help me to edit my code?