Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Otto <markdotto@gmail.com>2017-11-08 07:45:26 +0300
committerMark Otto <markdotto@gmail.com>2017-11-08 07:45:26 +0300
commit9c213b7f27295cd12774b550087720f002a6787e (patch)
tree41ebbe69350d9ce98f39f201b7f03d451d684388 /js/dist/popover.js
parent9deb1c677cc77a2bd2db03bacc8d2f271c772671 (diff)
upgrade to node 8.9.x and dist
Diffstat (limited to 'js/dist/popover.js')
-rw-r--r--js/dist/popover.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/js/dist/popover.js b/js/dist/popover.js
index 8b28a3b5df..da64dc486a 100644
--- a/js/dist/popover.js
+++ b/js/dist/popover.js
@@ -88,13 +88,20 @@ var Popover = function ($) {
var $tip = $(this.getTipElement()); // we use append for html objects to maintain js events
this.setElementContent($tip.find(Selector.TITLE), this.getTitle());
- this.setElementContent($tip.find(Selector.CONTENT), this._getContent());
+
+ var content = this._getContent();
+
+ if (typeof content === 'function') {
+ content = content.call(this.element);
+ }
+
+ this.setElementContent($tip.find(Selector.CONTENT), content);
$tip.removeClass(ClassName.FADE + " " + ClassName.SHOW);
}; // private
_proto._getContent = function _getContent() {
- return this.element.getAttribute('data-content') || (typeof this.config.content === 'function' ? this.config.content.call(this.element) : this.config.content);
+ return this.element.getAttribute('data-content') || this.config.content;
};
_proto._cleanTipClass = function _cleanTipClass() {