JSFiddle - React, Tailwind, and code Playground
HTML
<section class="imagesec" data-img-width="400px">
<button>click me</button>
<img src="xyx.jpg"> <!-- image actual width = 400px -->
<hr>
</section>
<section class="imagesec" data-img-width="300px">
<button>click me</button>
<img src="abc.jpg"> <!-- image actual width = 300px -->
<hr>
</section>
JavaScript
$('section.imagesec[data-img-width]').filter(function(){
return (parseInt($(this).attr('data-img-width'),10) < 350);
}).show();