Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,20 @@
var el = self.render(true);

// Add extra className to the pagination element
if (attributes.className) {
if (attributes.className) {
el.addClass(attributes.className);
}

// Append/prepend pagination element to the container
var elClones = [];
container.each(function(index, element) {
var elClone = el.clone(true);
$(element)[attributes.position === 'bottom' ? 'append' : 'prepend'](elClone);
elClones.push(elClone);
})

// Convert the clones array of elements into a jQuery set. Update "el" to this new set of "els".
el = $(elClones).map(function () { return this.toArray(); });
model.el = el;

// Append/prepend pagination element to the container
Expand Down