From 1f9c9983f5142935446c580804727246e9e77783 Mon Sep 17 00:00:00 2001 From: Jade Ramalho Date: Thu, 7 Nov 2013 16:06:07 +1100 Subject: [PATCH] Update bootstrap-paginator.js Adding support for Bootstrap data-toggle attribute --- src/bootstrap-paginator.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/bootstrap-paginator.js b/src/bootstrap-paginator.js index 930b8a2..41206ed 100644 --- a/src/bootstrap-paginator.js +++ b/src/bootstrap-paginator.js @@ -373,6 +373,7 @@ itemContent = $(""),//creates the item content text = "", title = "", + dataToggle = this.options.dataToggle, itemContainerClass = this.options.itemContainerClass(type, page, this.currentPage), itemContentClass = this.getValueFromOption(this.options.itemContentClass, type, page, this.currentPage), tooltipOpts = null; @@ -415,6 +416,10 @@ itemContent.attr("href", this.getValueFromOption(this.options.pageUrl, type, page, this.currentPage)); } + if (this.options.dataToggle) { + itemContent.attr("data-toggle", this.getValueFromOption(this.options.dataToggle, type, page, this.currentPage)); + } + if (this.options.useBootstrapTooltip) { tooltipOpts = $.extend({}, this.options.bootstrapTooltipOptions, {title: title}); @@ -586,6 +591,7 @@ onPageClicked: null, onPageChanged: null, useBootstrapTooltip: false, + dataToggle: null, shouldShowPage: function (type, page, current) { var result = true;