You can use window.innerWidthandwindow.innerHeight
You can place any dom element relative to the window using the position css 'fixed' or absolute, so that when the window is resized, the will is rebuilt.
You can use the window.onresizewindow resize event to listen
jQuery equivalent
$(window).width(); $(window).height() and $(window).resize(function(){});
Anoop source
share