This is a simple jQuery plugin I created for a game that needed a button panel that would dynamically resize elements to fit the panel depending on how many elements there were.