trigger window resize
snippet in javascript

jquery window trigger resize

user4690

window.dispatchEvent(new Event('resize'));

trigger window resize

user4848

// Cross-browser solution (IE support)
var resizeEvent = window.document.createEvent('UIEvents'); 
resizeEvent.initUIEvent('resize', true, false, window, 0); 
window.dispatchEvent(resizeEvent);