I have been experimenting with basic JavaScript for the data-reviews="2"
scenario and it worked successfully. However, what I am aiming for is to hide the entire <span>
section when the value of data-reviews
is less than 5 or any specific number. I require some guidance on this. My goal is to achieve a similar result, but by hiding the section when data reviews are under 5.
<div class="collection-list-badge">
<span class="stamped-product-reviews-badge" data-id="5649263493270" style="display:block;">
<span class="stamped-badge" data-rating="5.0" data-lang="en" aria-label="Rated 5.0 out 42reviews"></span>
</span>
<span class="stamped-badge-caption" data-reviews="42" data-rating="5.0" data-label="reviews" aria-label="42 reviews" data-version="2">42</span>
</div>