Find an Agent

Agent Listings

jQuery(function($) { var num_cols = 7, container = $('.split-list'), listItem = 'li', listClass = 'sub-list'; container.each(function() { var items_per_col = new Array(), items = $(this).find(listItem), max_items_per_col = Math.ceil(items.length / num_cols), difference = (max_items_per_col * num_cols)- items.length; for (var i = 0; i < num_cols; i++) { if (i == num_cols-1) { items_per_col[i] = max_items_per_col - difference; } else { items_per_col[i] = max_items_per_col; } } for (var i = 0; i < num_cols; i++) { $(this).append($('
    ').addClass(listClass)); for (var j = 0; j < items_per_col[i]; j++) { var pointer = 0; for (var k = 0; k < i; k++) { pointer += items_per_col[k]; } $(this).find('.' + listClass).last().append(items[j + pointer]); } } }); }); .split-list ul{ float: left; margin-left: 1em; } .split-list > li{ padding-right: 2em; line-height: 1.5em; font-size:12px; } .alpha-label { font-size: 18px !important; font-weight: bold; }