<div class="catalog-flex catalog-block" id="0">1</div>
<div class="catalog-flex catalog-block" id="1">2</div>
<div class="catalog-flex catalog-block" id="2">3</div>
<div class="catalog-flex catalog-block" id="3">4</div>
<div class="catalog-flex catalog-block" id="4">5</div>
<div class="catalog-flex catalog-block" id="5">6</div>
<div class="catalog-flex catalog-block" id="6">7</div>
<div class="catalog-flex catalog-block" id="7">8</div>
<div class="catalog-flex catalog-block" id="8">9</div>
<div class="catalog-flex catalog-block" id="9">10</div>
<div class="catalog-flex catalog-block" id="10">11</div>
jQuery(document).ready(function ($){
var pagmin = '2';
var pagmax = '5';
var divs = document.querySelectorAll('.catalog-flex.catalog-block');
divs.forEach(function(item) {
if (parseInt(item.id) < pagmin || parseInt(item.id) > pagmax) item.style.display = "none";
});
});
This Pen doesn't use any external CSS resources.