Skip to content

Instantly share code, notes, and snippets.

@michaelwills
Forked from hdragomir/$.fn.redraw.js
Created January 17, 2012 04:11
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 michaelwills/1624604 to your computer and use it in GitHub Desktop.
Save michaelwills/1624604 to your computer and use it in GitHub Desktop.
Quick jQuery plugin to force element redraws
(function($){
$.fn.redraw = function(){
return $(this).each(function(){
var n = document.createTextNode(' ');
$(this).append(n);
setTimeout(function(){n.parentNode.removeChild(n)}, 0);
});
}
})(jQuery)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment