Vertically Align an Element with jQuery - Vertical Align an Anchor or Div

//align text vertically
var i = 1; // for debugging
$('div.view-home-colored-circles div.view-content ul li a').each(function(){
 
		var ah = $(this).height();
 
                // insert the element/id/class to center within
		var ph = $(this).parents('li').height();
 
		var mh = Math.ceil((ph-ah) / 2);
 
                // may choose to use margin-top - depends on your case
                $(this).css({'padding-top':mh});
 
                // for debugging
                console.log('a position: ' + i + 
					'a height: ' + ah + 
					'li height:' + ph +
					'padding-top: ' + mh);
 
        // increment counter to track styles applied to which element
        i++;
 
});