So I have this div which holds a form that has validation messages fade in and out changing the width and height of the div. I have some jQuery to center the div but the problem Im having is when the validation messages fade in and resize the div the jQuery doesn't respond.
I need some code to listen to the width & height of the div?
The code I have currently
resizeElement = '.blurHolder';
var holderHeight = jQuery(resizeElement).outerHeight();
var holderWidth = jQuery(resizeElement).outerWidth();
jQuery(resizeElement).css({
'margin-top': - holderHeight / 2,
'margin-left': - holderWidth / 2
});
Any Help?