<h4 class="number1">1</h4> <h4 class="number2">2</h4> <h4 class="number3">3</h4> <h4 class="number4">4</h4>
function someName(from, to){ var result = []; while(from++ < to){ result.push( ".number" + from ); }; return result.join(", "); }; alert( someName(2,4) );
var out = []; while( k < PointNumber ){ out[ out.length ] = ".number"+(++k); } var $result = $( out.join(",") );
$('div:lt('+(PointNumber+1)+'):gt('+k+')')