I have some divs with display: inline-block; and I have to select first row of divs and set them for example different border color and I need to do it in javaScript (jQuery).>
You may use vanilla CSS Selector for this in jquery. Assuming that you have a grid of 3 X 3.
$( ".container .item:nth-child(3n + 1)" ).css( "border-color","black" );