diff --git a/www/assets/js/paginator.js b/www/assets/js/paginator.js
index 27be0ef9..84a27677 100644
--- a/www/assets/js/paginator.js
+++ b/www/assets/js/paginator.js
@@ -14,7 +14,7 @@
for(var k in defaults)
if(!this.opts[k])
this.opts[k] = defaults[k];
- this.paginator = $("
").addClass("pagination");
+ this.paginator = $("").addClass("pagination");
this.loadPage(0);
}
@@ -22,9 +22,11 @@
var pages = parseInt(this.items.length / this.opts.itemsPerPage) + 1;
var endcaps = pages > this.opts.maxPages;
this.paginator.html("");
- if(this.items.length < this.opts.itemsPerPage)
+ if (this.items.length < this.opts.itemsPerPage) {
+ this.paginator.css("margin-top", "0");
return;
- var ul = $("").appendTo(this.paginator);
+ }
+ var ul = this.paginator;
var s = p - parseInt(this.opts.maxPages / 2);
s = s + this.opts.maxPages < pages ? s : pages - this.opts.maxPages;
s = s < 0 ? 0 : s;