Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed jQuery 1.7 issue appending collection of elements
  • Loading branch information
pavelthq authored and Eugene Simakin committed Nov 6, 2015
1 parent 799e2d5 commit 9b91c76
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions jquery.twbsPagination.js
Expand Up @@ -63,11 +63,11 @@
this.$element.append(this.$listContainer);
}

this.render(this.getPages(this.options.startPage));
this.setupEvents();

if (this.options.initiateStartPageClick) {
this.$element.trigger('page', this.options.startPage);
this.show(this.options.startPage);
} else {
this.render(this.getPages(this.options.startPage));
this.setupEvents();
}

return this;
Expand Down Expand Up @@ -192,7 +192,10 @@
render: function (pages) {
var _this = this;
this.$listContainer.children().remove();
this.$listContainer.append(this.buildListItems(pages));
var items = this.buildListItems(pages);
jQuery.each(items, function(key, item){
_this.$listContainer.append(item);
});

this.$listContainer.children().each(function () {
var $this = $(this),
Expand Down
2 changes: 1 addition & 1 deletion jquery.twbsPagination.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9b91c76

Please sign in to comment.