fix(affix): initialize when window is ready, refresh when content is loaded.