if (games.length)
{
var line = Math.floor(pwidth / gwidth), left = (pwidth - (line * gwidth)) / (line - 1);
games.each(function(i)
{ //evenly space except the ends
$(this).css('margin-right', ( ((i + 1) % line) ? left : 0 ));
});
}
if (games.length)
{
var line = Math.floor(pwidth / gwidth), left = Math.floor((pwidth - (line * gwidth)) / (line * 2));
games.css({ 'margin-left': left, 'margin-right': left });
}
We use essential cookies to make this site work, and optional cookies to enhance your experience.