Created
July 3, 2012 10:47
-
-
Save r-isayev-parc/3038998 to your computer and use it in GitHub Desktop.
Оптимизация создания DOM элементов
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
loadingPageDocuments: function(customCount) { | |
var loader = $('<li class="b-load"><div class="b-borders"></div></li>'), | |
count = customCount || this.perPage, | |
container = $('#relations_page'); | |
for (var i = 0; i < count; i++) { | |
container.append(loader.clone()); | |
} | |
}, |
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
loadingPageDocuments: function(customCount) { | |
var loaderTpl = '<li class="b-load"><div class="b-borders"></div></li>', | |
count = customCount || this.perPage, | |
container = $('#relations_page'), | |
loaders = ''; | |
for (var i = 0; i < count; i++) { | |
loaders += loaderTpl; | |
} | |
container.append(loaders); | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment