function detectGrid(el, options, side) {
    var items = $(options.matching || el.children, el);
    var c = {};

    each(items, function(w) {
        var val = Math.round(w[side]);
        (c[val] || (c[val] = [])).push(w);
    });

    return Object.keys(c).map(Number).sort(byNumber).map(selectFrom(c));
}
Detects the grid by measuring which elements align to a side of it.
@param {!HTMLElement} el 
@param {import('../core/types').ISplittingOptions} options
@param {*} side