How can I capture the end height of the window after resizing? Using onResize is giving me the height of the window in the beginning of the event. However, I need the end size. Thanks for the responses in advance. I found this: link But can I implement something without timers or jQuery?
Asked
Active
Viewed 291 times
0
-
1To be honest, the 'timer' solution will be your best best. By using timers and and waiting for the final event, you're debouncing the other events (preventing multiple events from firing or queuing up!) – Jack Aug 21 '12 at 07:31
-
1There is no way to know when resize events are done and thus it has achieved the final size for that resize session. That's why people generally use a short timeout and the code processes the current size when the timeout fires. That's the way it is usually done. Why don't you want to use timers? – jfriend00 Aug 21 '12 at 07:44
-
If you absolutely don't want to use timer, listen to `mousemove` and `keydown` events that when fired, check the height then stop listening. – Jay Aug 24 '12 at 14:22