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 can get the width of your container which has a css-style named "container" by $(".container").width,
and then you can calculate how many divs can be put in the first row,and put it in a variable like firstrow_divNums.
now use $(".calculate").children() to get the child-divs,
finally use "for" loop from $(".calculate").children().eq(0) to $(".calculate").children().eq(firstrow_divNums) ,
and now you can do what you want like adding css-style to any elements.