Skip to content

Instantly share code, notes, and snippets.

@capitalist
Created October 3, 2011 18:33
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 capitalist/1259854 to your computer and use it in GitHub Desktop.
Save capitalist/1259854 to your computer and use it in GitHub Desktop.
Ensure wresize
(function(a){a.fn.wresize=function(b){function c(){if(a.browser.msie)if(!wresize.fired)wresize.fired=!0;else{var b=parseInt(a.browser.version,10);wresize.fired=!1;if(b<7)return!1;if(b==7){var c=a(window).width();if(c!=wresize.width)return wresize.width=c,!1}}return!0}function d(a){if(c())return b.apply(this,[a])}return version="1.1",wresize={fired:!1,width:0},this.each(function(){this==window?a(this).resize(d):a(this).resize(b)}),this}})(jQuery)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment