Skip to content

Instantly share code, notes, and snippets.

@emaxerrno
Created September 27, 2013 17:36
Show Gist options
  • Select an option

  • Save emaxerrno/6732144 to your computer and use it in GitHub Desktop.

Select an option

Save emaxerrno/6732144 to your computer and use it in GitHub Desktop.
repaintjs
repaint: function() {
var self = this;
Yieldmo.foreach(self.placements, function(placement){
if (placement){
var t = document.createTextNode(' ');
placement.appendChild(t);
placement.offsetHeight; // forces repaint
setTimeout(function() { placement.removeChild(t); }, 0);
}
});
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment