Skip to content

Instantly share code, notes, and snippets.

@hdragomir
Created December 14, 2010 09:45
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save hdragomir/740199 to your computer and use it in GitHub Desktop.
Save hdragomir/740199 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