Improved performance of resising by redusing populating resize event only to visible elements and caching outer and inner box dimenssions