<div class="fleft">
<h2>Product 1</h2>
</div>
<div class="fleft">
<h2>Product 2</h2>
</div>
$(function () {
var blocks = $('.fleft').find('h2');
blocks.each(function () {
var parent = $(this).parent('.fleft');
if ($(this).text() == 'Product 1') {
parent.css('border', '3px solid red');
} else {
parent.hide();
}
});
});