Nice progressbar for loading

This commit is contained in:
Šesták Vít
2017-03-01 15:48:41 +01:00
parent 90f785b865
commit 81769c8309

View File

@@ -69,7 +69,11 @@ function lazyLoad(el){
$el.attr("data-lazyload-url", newUrl);
}
if(url){
$el.html("Loading");
$el.html($('<div class="progress">')
.append(
$('<div class="progress-bar progress-bar-striped active" role="progressbar" style="width: 100%;">Loading…</div>')
)
);
$el.load(url, function( response, status, xhr ) {
if ( status == "error" ) {
$el.html("Error when loading data");