A grid is implemented using the CSS flexbox. Example:
The number of rows in this example is 4 because I fixed the container width for demo purposes. But, in
If you're using Jquery and are confident that your grid objects are vertically aligned, this could do the trick..
I didnt test it, but it should work (by counting the columns)
function countColumns(){ var objects = $(".grid-object"); // choose a unique class name here var columns = [] for(var i=0;i