Skip to content

Instantly share code, notes, and snippets.

@jasonwyatt
Created September 27, 2010 19:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasonwyatt/599640 to your computer and use it in GitHub Desktop.
Save jasonwyatt/599640 to your computer and use it in GitHub Desktop.
// Triggers the 'onresize' event for the window manually.
if(document.createEventObject){
window.fireEvent('onresize', document.createEventObject());
} else {
var evt = document.createEvent("HTMLEvents");
evt.initEvent('resize', true, true);
window.dispatchEvent(evt);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment