Created
March 13, 2015 17:05
-
-
Save TinyExplosions/ea035a7d2f257f367888 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create your new elements all in memory, saves on repaints | |
var $ul = $('<ul>'); | |
for (var i = 0; i < whatever; i++) { | |
$ul.append('<li>Dropdown item</li>'); | |
}; | |
//then append to DOM when complete | |
$(elem).after($ul); | |
//trigger event, 0 should be enough to do `nextTick` sorta thing. | |
setTimeout($(elem).triger('dompainted'),0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment