turn progress bar resize event hook to be called as a function