In a large, nonstick skillet over medium heat, melt butter. Add sugar to pan and cook until sugar dissolves, about 1 - 2 minutes. Add onion and garlic to pan can cook until onions are tender, about 30 minutes, stirring occasionally. Add balsamic vinegar to mixture and cook 10 minutes longer or until golden brown, stirring frequently. Stir in salt and pepper. Remove onion jam to a bowl.